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

PROGRAMMING:Extension of hundred chicken problem n-chicken problem

Luz5年前 (2021-05-10)题库743
`N yuan to buy n chickens, 5 yuan for each rooster, 3 yuan for each hen, and 1 yuan for 3 chickens. N yuan to buy n chickens must be just right, and the whole chicken must be bought, not split< br>
How many ways to buy it? This is the chicken problem< br>
###Input format:
Enter a positive integer 'n' on a line` N<500`)
###Output format:
Output two integers' C 'and's' in one line, separated by a space in the middle, indicating that there are' C 'ways to buy' n 'chickens for' n 'yuan, and the sum of the number of cocks in all ways is's'< br>
**If there is no solution, then's' is' - 1 '**
###Input sample 1:
```in
one hundred
```
###Output sample 1:
```out
4 24
```
###Input sample 2:
```in
one
```
###Output sample 2:
```out
0 -1
```







answer:If there is no answer, please comment