Smallest Prime Factor
Computer Mathematics
Easy
3 views
Problem Description
Given n>1, print its smallest prime factor.
Input Format
One integer n.
Output Format
One integer.
Official Solution
Try divide i=2..sqrt(n). First divisor is answer. If none, answer is n.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!