|Check if a number is prime....|General Coding Problems

fn is_prime(n: u32) -> bool

Easy

Check if a number is prime.

fn is_prime(n: u32) -> bool

Asked in

tcs

Examples

Example 1:
Input: 17
Output: true
Example 2:
Input: 20
Output: false
Submit Result

Click Run to test sample cases, or Submit to evaluate all cases