2017 eighth annual Blue Bridge Cup C + + Group B Provincial race-shopping list

Source: Internet
Author: User
Tags ming

Title: Shopping Tanxiaoming just found a job, the boss is very good, but the boss of the wife is very fond of shopping. When the boss is busy, he often lets Xiao Ming help to shop on behalf of the mall. Xiao Ming is very bored, but not good to refuse. This is not, XX big promotion again come! The boss's wife made a long shopping list, and all of them had discounted prices. Xiao Ming also has a quirk, not the last resort, never swipe, direct cash to settle. Now Xiao Ming is very upset, ask you to help him calculate, need to withdraw money from the machine to get how much cash, can take care of this shopping. Cash machine can only provide 100 yuan denomination of banknotes. Xiao Ming wants to take as little cash as possible, enough on the line. Your task is to figure out how much money Xiao Ming needs to take at least. The following is a headache shopping list, in order to protect privacy, the item name is hidden. --------------------* * * * 180.90 88 percent * * * 10.25 65 percent * * * 56.14 90 percent * * 104.65 90 percent * * * 100.30 88 percent * * * 297.15 HALF PRICE * * * 26.75 65 percent * * 130.62 HALF PRICE * * * 240.28 58 percent * 270.62 80 percent * * * * 115.87 88 percent * * * 247.34 95 percent * * 73.21 90 percent * * * 101.00 half Price * * * * 79.54 HALF PRICE * * * 278.44 70 percent * * 199.26 HALF PRICE * * * 12.97 90 percent * * 166.30 7        80 percent * * * 125.50 58 percent * * * 84.98 90 percent * * * 113.35 68 percent * * 166.57 HALF PRICE * * 42.56       90 percent * * * 81.90 95 percent * * * 131.78 80 percent * * * 255.89 78 percent * * 109.17 90 percent * * 146.69     68 percent * * *139.33 65 percent * * * * 141.16 78 percent * * * 154.74 80 percent * * * 59.42 80 percent * * 85.44 68 percent * * * 293.70 88 percent * * * * 261.79 65 percent * * * 11.30 88 percent * * * 268.27 58 percent * * 128.29 88 percent * * * 251.03 80 percent * * * * 208.39 75 percent * * * 128.88 75 percent * * * 62.06 90 percent * * 225.87 75 percent 12.89 75 percent * * * * 34.28 75 percent * * * 62.16 58 percent * * 129.12 HALF PRICE * * * 218.37 Price * * * * 289.69 80 percent--------------------it should be stated that 88 percent refers to 88% of the list price, while 80 percent is calculated by 80%, and the remainder of the analogy. In particular, half price is calculated at 50%. Please submit the amount that Xiao Ming wants to withdraw from the teller machine, Unit is yuan. The answer is an integer, similar to 4300, the end is necessarily 00, do not fill in any superfluous content. Special reminder: You are not allowed to bring a calculator or open your phone.

This problem can be used in both TXT processing data and then write code to do, also can be done in Excel, the following my method uses Excel to do
1. First paste the data into a Word document

2. Then use the replacement to remove the * and then turn the discount into percentile.

3. Then select All, click on the Insert-and-form text into the table, then the default point is OK (remember to select all, otherwise the text into a table is gray)

4. Then select all, open a new Excel table, paste

5. Then start the function operation ~

The final answer is 5200.

For a skilled Excel person, this can be done within 3 minutes ~

 

2017 eighth annual Blue Bridge Cup C + + Group B Provincial race-shopping list

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.