+ 4

-CHALLENGE- Coins Exchange

Description : There are 5 type of coins : - 1cent - 5cent - 10cent - 50cent - 100 cent Steve have 11coins, and he want exchange it to a cent, how many possibilities? Example : Input = 11 Output = 4 Explain : 11 coins can be exchange into coins in 4 difference way, they are : - 11 1cent coins - 1 10cent coin + 1 1cent coin - 2 5cent coins + 1 1cent coin - 1 5cent coins + 6 1cent coins Your task : Find the how many possibilities of coin exchange. Guaranteed Constraint : Coins type = 5, they area 1,5,10,50 and 100 cent. 1 <= n <= 7989, that mean the coins to exchange will not bigger than 7989 Any doubts on the question? Just tell me :D Happy coding!

28th Nov 2017, 3:18 PM
Momo Belia
Momo Belia - avatar
1 Resposta
28th Nov 2017, 5:25 PM
sayan chandra
sayan chandra - avatar