6 kyu
Basket of Fruits
104madars
Description:
There are 6 types of fruits in the basket: Apples, Pears, Oranges, Lemons, Bananas and Tomatoes.
Your task: given a total number of fruits as an argument (always positive), return the highest possible number of Bananas, while following ALL the rules below:
There are 17 more Oranges than Apples.
There are 40% less Pears than Oranges.
There are 5/6 more Lemons than Pears.
There are 3x less Apples than Bananas.
There might be some Tomatoes left in the basket after you sort them (we dont want the Tomatoes, people think they are vegetables and it gets confusing).
If there are not enough total fruits to follow the rules, return "false".
All fruits must ALWAYS be counted as whole numbers.
Mathematics
Puzzles
Similar Kata:
Stats:
Created | Oct 22, 2017 |
Published | Oct 22, 2017 |
Warriors Trained | 554 |
Total Skips | 20 |
Total Code Submissions | 832 |
Total Times Completed | 104 |
JavaScript Completions | 104 |
Total Stars | 13 |
% of votes with a positive feedback rating | 78% of 29 |
Total "Very Satisfied" Votes | 20 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |