质数判断
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
定义一个函数isPrime,判断输入的数是否是质数
输入
一个非负整数,表示需要判断的数
输出
如果是质数输出yes,否则输出no
7
yes
提示
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
定义一个函数isPrime,判断输入的数是否是质数
一个非负整数n,表示需要判断的数
如果是质数输出yes,否则输出no
7
yes
0<=n<=109