Decomposition of a number into 5 and 3
Problem
Into how many fives and triples can a number be expanded so that the number of expansions is minimal.
Input
The input is a single natural number N
(\(7 < N < 1000\)).
Imprint
Print two space-separated integers: the number of fives and the number of threes.
Examples
# |
Input |
Output |
1 |
8 |
1 1 |
2 |
11 |
1 2 |
3 |
15 |
3 0 |