| TheForces Round #45 (DIV3-Forces2) |
|---|
| Finished |
Define $$$f(x, y) = \begin{cases} 1 & \text{if } x \bmod y = 1 \\ 0 & \text{otherwise} \end{cases}$$$
You are given an integer $$$n$$$. Find any positive integer $$$m$$$, which makes $$$f(m,1) + f(m,2) + \ldots + f(m,n)$$$ reach the maximum.
In other words, for all $$$i \in [1, +\infty)$$$, $$$$$$f(m,1) + f(m,2) + \dots + f(m,n) \ge f(i,1) + f(i,2) + \dots + f(i,n)$$$$$$
You need to find two values: $$$m$$$ and $$$f(m,1) + f(m,2) + \ldots + f(m,n)$$$. Since there can be multiple possible such $$$m$$$, you can output any.
The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le $$$ $$$10 ^ 3$$$). The description of the test cases follows.
A single line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^{9}$$$).
For each test case, output two values — $$$m$$$($$$1 \le m \le 10^{18}$$$) and $$$f(m,1) + f(m,2) + \ldots + f(m,n)$$$. It can be proven that such $$$m$$$ always exists for $$$1 \le m \le 10^{18}$$$. Since there can be multiple possible such $$$m$$$, you can output any.
235
7 261 4
In the first test case, $$$f(m,1)+f(m,2)+f(m,3)=f(7,1)+f(7,2)+f(7,3)=0+1+1=2$$$, which reaches the maximum.
| Name |
|---|


