Fabrice Bellard仅仅只用447B代码, 计算出已知最大的素数, 大约有1700万位。
int m=1711276033,N=1,t[1<<25]={2},a,*p,i,e=39717691,s,c,U=1;g(d,h){for(i=s;i<1<<
24;i*=2)d=d*1LL*d%m;for(p=t;p<t+N;p+=s)for(i=s,c=1;i;i--)a=p[s]*(h?c:1LL)%m,p[s]
=(m*1U+*p-a)*(h?1LL:c)%m,*p=(a*1U+*p)%m,p++,c=c*1LL*d%m;}main(){while(e/=2){N*=2
;U=U*1LL*(m+1)/2%m;for(s=N;s/=2;)g(40,0);for(p=t;p<t+N;p++)*p=*p*1LL**p%m*U%m;
for(s=1;s<N;s*=2)g(983983719,1);for(a=0,p=t;p<t+N;)a+=*p<<(e&1),*p++=a%10,a/=10;
}while(!*--p);for(t[0]--;p>=t;)putchar(48+*p--);}
编译器要求支持64B的long long 类型,Linux 下gcc编译成功,2.3Ghz 双核CPU大约需要2分钟的运行时间。
2025年4月30日 01:47
I exploit solely premium quality products -- you will observe these individuals on: Kissimmee Exterminator
2025年4月30日 01:48
Amazing, this is great as you want to learn more, I invite to This is my page. Bed Bug Treatment Orlando
2025年4月30日 01:50
I can give you the address Here you will learn how to do it correctly. Read and write something good. Oviedo Termite Control
2025年4月30日 01:50
Very good topic, similar texts are I do not know if they are as good as your work out. Lakeland Exterminator
2025年7月19日 07:21
Beaver says I also have such interest, you can read my profile here: federal Indian law
2025年8月29日 02:00
<p>
<span style="font-family: Verdana, Geneva, sans-serif; font-size: 12px;">Why do only so much written on this subject? Here you see more. </span><a href="https://www.goodmoneyss.com/" style="color: rgb(0, 0, 170); font-family: Verdana, Geneva, sans-serif; font-size: 12px;">จำนำรถติดไฟแนนซ์</a></p>
2025年12月25日 21:44
앞으로도 자주 방문하겠습니다. 출장마사지