| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 0.5 초 | 2048 MB | 89 | 40 | 18 | 37.500% |
After beating your friend Reyn in various games such as Chess, Backgammon, Checkers, and Battleships, you have almost managed to convince him that you possess the Monado -- a magic sword that lets you see the future. In an act of desparation, he offers you one last challenge. He will tell you a number $n$ between 1 and 10ドル^{16}$ and then secretly pick a prime number $p$ of any size. It will then be your job to tell him an even number $m,ドル where $n < m < n+50,ドル and $p^2 + m$ is a composite number (a composite number is a positive integer, which can be formed by multiplying two smaller positive integers). If both of those conditions are fulfilled, it will be clear that the future truly is yours to decide. Luckily, you suspect that Reyn might not have thought this game through very well, and that it is probably possible to determine an $m,ドル which adds up to a composite number with any possible value of $p$.
With this knowledge in mind, make a program that can beat Reyn, no matter what numbers he picks.
The input consists of:
Output a single even number $m,ドル where $n < m < n+50$ and $p^2 + m$ is composite for any prime $p$.
If there are multiple valid solutions, you may output any one of them.
5
26
4242
4256