P1464 Function
Description
For a recursive function $w(a,b,c)$:
- If $a \le 0$ or $b \le 0$ or $c \le 0$, return $1$.
- If $a>20$ or $b>20$ or $c>20$, return $w(20,20,20)$.
- If $a
Input Format
Multiple lines of input. Each line contains three integers $a, b, c$.
The input ends with $-1,-1,-1$.
Output Format
Output multiple lines. Each line should be in the format:
`w(a, b, c) = ans`
Mind the spaces.
Explanation/Hint
### Constraints
- Each input number is an integer in $[-9223372036854775808, 9223372036854775807]$.
- The number of input lines excluding $-1, -1, -1$, denoted $T$, satisfies $1 \leq T \leq 10^5$.
Translated by ChatGPT 5