Logo
(追記) (追記ここまで)

23145번 - Historic Breakthrough 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB8418615.385%

문제

Rikka is taking the undergraduate cryptography course this year. In the class, it is mentioned that a new method of factorization was recently discovered, which is considered a historic breakthrough in cryptography. Rikka believes that there will be comparable algorithms for some specific class of numbers with simpler goals.

Now you are asked to design and implement such a "factorization" algorithm: given an integer $m,ドル print an integer $n$ such that $$m = \frac{n \varphi(n)}{2} = \sum\limits_{\begin{array}{c}1 \le i \le n, \\ \mathrm{gcd}(i, n) = 1\end{array}} i \text{.}$$ It is guaranteed that such an $n$ exists in all the test cases.

입력

The first line of input contains an integer $T$ (1ドル \le T \le 51$), the number of test cases.

The $i$-th of the following $T$ lines contains a single integer $m_i$ (0ドル < m_i < 10^{36}$).

출력

For each test case, print an integer $n_i$ for the corresponding $m_i$. It is guaranteed that the answer exists in every test case. If there are several possible answers, print any one of them.

제한

예제 입력 1

3
20
21
475750381222420656586462245096576000

예제 출력 1

10
7
1497700821900508526

힌트

출처

Camp > Petrozavodsk Programming Camp > Summer 2021 > Day 5: 2021 Shanghai ICPC Camp Onsite 2 by PKU H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /