Next Prime
Computer Mathematics
Medium
2 views
Problem Description
Given n, print the smallest prime >= n.
Input Format
One integer n.
Output Format
One integer prime.
Official Solution
Loop x from n upward, test primality, stop at first prime.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!