承 a787,本題以英文敘述
The math exam has just finished, so Y asked Frankie and Lennon again about math questions!
She asked:" Are these numbers primes? "
Though Frankie and Lennon wanted to tell her the answer immediately, the numbers were so big that they couldn't reply her in such a short time.
Thus, please help Frankie and Lennon write a program in order to answer her rapidly.
There are many lines of inputs.
(There are only about 100 lines of test cases inside the input file)
Each line has a number n, which n is less than $2^{47}$.
If n is a prime, print: "PRIME!!!".
While n is not a prime, print: "nope".
3 1 1000000007
PRIME!!! nope PRIME!!!
Faster Faster Faster
*Don't try to use getcharI/O*
*Miller-Rabin is OK, but there's no need~~*
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
1665 |
frankie
(34104)
|
a788 | 212 | 2022-07-06 19:00 | |
1663 |
william1010121
(郭勝威)
|
a788 | 241 | 2022-07-06 00:10 |