摘要: 这个题坑了太久太久啊!!!!!贡献了得有30+WA才发现原来是因为在乘法中有溢出导致一直TLE啊。。。。但是到最后也不知道有个问题怎么解决的。就是在getp()中的num值的诡异的改变!#include#include#includetypedef long long LL;const int TON=20100501;const int max1=2000005;int p[max1],b[max1]={0},num=0;void getp(){ int i,j; for (i=4;i=rec) { ans+=n/rec; rec*=pp; } return ans;}//求出n!中质因子的 阅读全文
posted @ 2013-12-23 23:10 ACalvin 阅读(163) 评论(0) 推荐(0) 编辑