7 kyu
ATM
1,498 of 6,486Sanan07
Description:
An ATM has banknotes of nominal values 10, 20, 50, 100, 200 and 500 dollars. You can consider that there is a large enough supply of each of these banknotes.
You have to write the ATM's function that determines the minimal number of banknotes needed to honor a withdrawal of n
dollars, with 1 <= n <= 1500
.
Return that number, or -1
if it is impossible.
Good Luck!!!
Fundamentals
Mathematics
Algorithms
Similar Kata:
Stats:
Created | Nov 1, 2015 |
Published | Nov 1, 2015 |
Warriors Trained | 11496 |
Total Skips | 153 |
Total Code Submissions | 15626 |
Total Times Completed | 6486 |
Java Completions | 1498 |
Ruby Completions | 198 |
JavaScript Completions | 2142 |
Python Completions | 2351 |
CoffeeScript Completions | 14 |
Kotlin Completions | 289 |
F# Completions | 35 |
C Completions | 167 |
COBOL Completions | 4 |
Total Stars | 135 |
% of votes with a positive feedback rating | 93% of 1013 |
Total "Very Satisfied" Votes | 891 |
Total "Somewhat Satisfied" Votes | 108 |
Total "Not Satisfied" Votes | 14 |
Total Rank Assessments | 37 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |