Change
Problem
Determine the number of different ways to pay change in the amount of n
rubles with bills 10
rubles and coins 5
, 2
and 1
ruble.
For example, 5
rubles can be paid in four different ways: 5 = 2 + 2 + 1 = 2 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 tt>.
Input data
The input to the program is a natural number n <= 100
— the amount of change to be paid.
Output
Output the desired number of payment methods.
Examples
# |
Input |
Output |
1 |
2 |
2 |
2 |
5 |
4 |
Запрещенные операторы: list
; [