| XAPC 2026 |
|---|
| Finished |
Last night, you had a strange dream. In it, you discovered a mysterious function $$$f(n)$$$ defined over integers. Upon waking up, the definition was still clear in your mind:
$$$$$$ f(n) = \begin{cases} n + 20 & \text{if } n \lt 48, \\ f\big(f(n - 21)\big) & \text{if } n \geq 48. \end{cases} $$$$$$
Curious about what this function actually computes, you decide to evaluate it for various values of $$$n$$$.
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^5$$$) — the number of test cases. Each of the next $$$t$$$ lines contains a single integer $$$n$$$ ($$$1 \leq n \leq 10^{18}$$$).
For each test case, output a single integer — the value of $$$f(n)$$$.
Each answer should be printed on its own line.
4 1 2 25 48
21 22 45 67
| Name |
|---|


