is it prime number?


Submit solution

Points: 20 (partial)
Time limit: 5.0s
Memory limit: 256M

Authors:
Problem type

題目說明

請輸入一整數N,判斷其是否為質數

質數定義: 因數只有1和自己,如:5(1, 5), 7(1, 7)

輸入限制: 均>0

輸入

整數N

輸出

true

false則輸出:

false
所有因數

sample input1

3

sample output1

true

sample input2

6

sample output2

false
1
2
3
6

Comments

There are no comments at the moment.