joj2359

本文将引导您通过编程找到指定区间内的所有质数,了解质数的基本定义和判断方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

2359: Prime Before 2007


ResultTIME LimitMEMORY LimitRun TimesAC TimesJUDGE
3s8192K1292682Standard

A prime number is a positve integer that is divided evenly only by 1 and itself. There are infinitely prime number. The Greek mathematician Euclid proved this more than 2,000 years ago. If a number has factors other than 1 and itself, it's called composite.

Is this year 2007 is a prime? Of course, it is not a prime. 2007 can be divided by 3 and other factors. Your task is to find all primes between 1000 and 2007.

Input

No input in this problem.

Output

Output all prime between 1000 and 2007 ascending. One prime in one line.

Sample Output

Output is just as below.

1009
1013
...
...
...
2003

Problem Source: 1st Jilin Province Contest, skywind


This problem is used for contest: 63  145  164 


Submit / Problem List / Status / Discuss


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值