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

PROGRAMMING:Each pen is 5 yuan, each signature pen is 3 yuan, and each pencil is 1 yuan. If you want to buy n pens with m yuan, you need to buy at least one pen of each kind. How many pens can you buy for each pen?

Luz5年前 (2021-05-10)题库563
Each pen is 5 yuan, each signature pen is 3 yuan, and each pencil is 1 yuan. If you want to buy n pens with m yuan, you need to buy at least one pen of each kind. How many pens can you buy for each pen?
###Input format:
Enter the actual value of M (number of money) and n (number of pens) successively.
###Output format:
The number of pens that can be purchased under all possible circumstances shall be output in the order of pen, signature pen and pencil, separated by commas. For example: 4,18,78; There are 4 pens, 18 signature pens and 78 pencils.
###Input example:
Here is a set of inputs. For example:
```in
100 100
```
###Output example:
```out
4,18,78
8,11,81
12,4,84
```







answer:If there is no answer, please comment