#C5511. Taco: Prime Number Computation
Taco: Prime Number Computation
Taco: Prime Number Computation
This problem requires you to determine the smallest prime number that is greater than a given integer m.
You are expected to implement two functions:
- is_prime(n): Determines whether an integer n is a prime number. Recall that a prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. In mathematical terms, n is prime if \( \forall d \in \mathbb{N},\, 1 < d < n \;\Rightarrow\; d \nmid n \).</p>
- smallest_prime_greater_than(m): Finds and returns the smallest prime number strictly greater than m.
Your solution should read the input from standard input (stdin), process it, and print the result to standard output (stdout).
Example: For an input of 10
, the smallest prime greater than 10 is 11
, so the output should be 11
.
inputFormat
The input consists of a single line containing an integer m (0 \le m \le 10^7
).
outputFormat
Output a single integer, which is the smallest prime number strictly greater than m.
## sample10
11
</p>