Find the discounted prices
Description:
Your friend Cody has to sell a lot of jam, so he applied a good 25% discount to all his merchandise.
Trouble is that he mixed all the prices (initial and discounted), so now he needs your cool coding skills to filter out only the discounted prices.
For example, consider this inputs:
"15 20 60 75 80 100"
"9 9 12 12 12 15 16 20"
They should output:
"15 60 75"
"9 9 12 15"
Every input will always have all the prices in pairs (initial and discounted) sorted from smaller to bigger.
You might have noticed that the second sample input can be tricky already; also, try to have an eye for performances, as huge inputs could be tested too.
Final Note: kata blatantly taken from this problem (and still not getting why they created a separated Code Jam for ladies, as I find it rather discriminating...).
Similar Kata:
Stats:
Created | Mar 24, 2016 |
Published | Mar 24, 2016 |
Warriors Trained | 1460 |
Total Skips | 50 |
Total Code Submissions | 2677 |
Total Times Completed | 549 |
Python Completions | 280 |
JavaScript Completions | 215 |
Ruby Completions | 57 |
Haskell Completions | 32 |
Go Completions | 3 |
Total Stars | 25 |
% of votes with a positive feedback rating | 91% of 149 |
Total "Very Satisfied" Votes | 128 |
Total "Somewhat Satisfied" Votes | 15 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 19 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |