1282: prime number

时间限制: C/C++ 1 s      Java/Python 3 s      内存限制: 128 MB      答案正确: 24 / 45     

题目描述

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. A natural number greater than 1 that is not a prime number is called a composite number.
Enter a natural number, determine whether it is a prime,  if it is a prime, “? is a prime number”. Otherwise,  print “? is a composite number”. If the input is not a natural number, Please continue to enter another number. To stop entering numbers, press the EOF key.

输入

Enter a natural number

输出

it is a prime, “? is a prime number”. Otherwise,  print “? is a composite number”.

样例输入

1
-4
5
6
0
7

样例输出

5 is a prime number
6 is a composite number
7 is a prime number

提示

来源

标签


提交代码






© 2019 JustOJ     中文  English  | l.jiang.1024@gmail.com | Docs | System Info | Telegram Group | Telegram Channel