| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 121 | 93 | 86 | 78.899% |
When Dr. Orooji was your age, one of the popular TV shows was “Get Smart!” The main character in this show (Maxwell Smart, a secret agent) had a few phrases; we used one such phrase for the title of this problem and we’ll use couple more in the output!
A “prime” number is an integer greater than 1 with only two divisors: 1 and itself; examples include 5, 11 and 23. Given a positive integer, you are to print a message indicating whether the number is a prime or how close it is to a prime.
The first input line contains a positive integer, n (n ≤ 100), indicating the number of values to check. The values are on the following n input lines, one per line. Each value will be an integer between 2 and 10,000 (inclusive).
At the beginning of each test case, output “Input value: v” where v is the input value. Then, on the next output line, print one of the following two messages:
Leave a blank line after the output for each test case. Follow the format illustrated in Sample Output.
4 23 25 22 10000
Input value: 23 Would you believe it; it is a prime! Input value: 25 Missed it by that much (2)! Input value: 22 Missed it by that much (1)! Input value: 10000 Missed it by that much (7)!