-->
当前位置:首页 > 题库

PROGRAMMING:exchange coins

Luz5年前 (2021-05-10)题库502
Xiao Ming likes coins. It is known that he has a sum of money in his hand, which is divided into cents. If he wants to change this sum of money into 5 cents, 2 cents and 1 cents, and requires at least one coin of each kind, how many ways can Xiao Ming change it?
###Input format:
Enter the amount of change in Xiaoming's hand (a positive integer greater than or equal to 8 and less than or equal to 100)
###Output format:
It is required to output the number of coins from small to large in the order of 5 cents, 2 cents and 1 cent. Each line outputs one substitution: < br > 1
Five = 5 cents, two = 2 cents, one = 1 cents
###Input example:
Here is a set of inputs. For example:
```in
fifteen
```
###Output example:
The corresponding output is given here. For example:
```out
five=1,two=1,one=8
five=1,two=2,one=6
five=1,two=3,one=4
five=1,two=4,one=2
five=2,two=1,one=3
five=2,two=2,one=1
```







answer:If there is no answer, please comment