- 博客(5)
- 收藏
- 关注
原创 poj 2689解题报告(区间筛素数,经典)
<br /> Prime DistanceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4814 Accepted: 1282<br />DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theo
2011-02-04 12:32:00 3601 2
转载 【转】素数总结
<br /><br />定义:除了1和其本身,没有其他约数的数。<br />测试:用n分别试除2到sqrt(n)的数,如果中间有一个能整除,即<br />为合数,否则即为素数<br />bool is_prime(int n)//判断n是否为素数,是素数返回1<br />{<br /> int i;<br /> bool flag = 1;<br /> for(i = 2; i <= sqrt(n); i++)<br /> {<br /> if(n % i == 0){
2011-02-04 11:07:00 1351 1
原创 poj 1811解题报告
<br /> Prime TestTime Limit: 6000MS Memory Limit: 65536KTotal Submissions: 17747 Accepted: 3644Case Time Limit: 4000MS<br />DescriptionGiven a big integer number, you are required to find out whether it's a prime number.<br />InputThe first line contains
2011-02-02 17:42:00 1491 1
原创 poj 3641解题报告
Pseudoprime numbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3611 Accepted: 1285DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by
2011-02-01 14:01:00 3048
原创 zoj 1312解题报告
<br /> Prime CutsTime Limit: 1 Second Memory Limit: 32768 KB <br />A prime number is a counting number (1, 2, 3, ...) that is evenly divisible only by 1 and itself. In this problem you are to write a program that will cut some number of prime numbers
2011-02-01 12:33:00 1195
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人