+ 1

Challenge: Represent any number n in sum of given number

Input any number n and respresent it in the form of sum of given numbers. You can only use this given list of numbers: ( 1, 2, 5, 10, 20, 50, 100, 500, 2000). e.g. 55 = 50 + 5 and so on.. The solution should not be only in sum of 1. 3 = 1+1+1 is wrong but 3 = 2+1 is right. You can not represent the number by sum of 1 only but 1 can be used multiple times. e.g. 4 = 2+1+1 is right. "Only sum is allowed" You don't need to print all the

29th Aug 2017, 7:47 PM
Real Coders
Real Coders - avatar
4 Respuestas
+ 3
https://code.sololearn.com/ckXT9xEo8zH1/?ref=app
30th Aug 2017, 2:39 AM
David Ashton
David Ashton - avatar
30th Aug 2017, 12:20 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar