#P8395. [CCC 2022 S1] Good Fours and Good Fives
[CCC 2022 S1] Good Fours and Good Fives
Problem Description
really likes and . He believes that every number can be obtained by adding and .
Examples:
or
or or
Of course, the order of and does not matter; what matters is how many of each you use.
Given a positive integer , ask how many ways there are to form using and .
Input Format
One line containing an integer , which is the number to be formed.
Output Format
One line containing the number of ways. If this number cannot be formed, output .
14
1
40
3
6
0
Hint
For of the testdata: .
For another of the testdata: , and it is guaranteed that .
For another of the testdata: , and it is guaranteed that .
For of the testdata: .
Translated by ChatGPT 5