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

Stats:

CreatedNov 1, 2015
PublishedNov 1, 2015
Warriors Trained11496
Total Skips153
Total Code Submissions15626
Total Times Completed6486
Java Completions1498
Ruby Completions198
JavaScript Completions2142
Python Completions2351
CoffeeScript Completions14
Kotlin Completions289
F# Completions35
C Completions167
COBOL Completions4
Total Stars135
% of votes with a positive feedback rating93% of 1013
Total "Very Satisfied" Votes891
Total "Somewhat Satisfied" Votes108
Total "Not Satisfied" Votes14
Total Rank Assessments37
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Sanan07 Avatar
  • jhoffner Avatar
  • CrazyMerlyn Avatar
  • Blind4Basics Avatar
  • mmalkavian Avatar
  • dmitvitalii Avatar
  • neilm Avatar
  • ZED.CWT Avatar
  • trashy_incel Avatar
  • akar-0 Avatar
Ad