Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:此代码不能直接小修改提交,望后来者注意...In Reply To:怎么老错了? Posted by:acm_bug at 2006-10-04 09:02:21 > #include<iostream> > #include<stdio.h> > #include<string.h> > using namespace std; > int b[10000]; > int main() > { > int a,c,i; > memset(b,0,10000); > for(i=0;i<10;++i) > { > cin>>c; a=c; > if(a==2)b[2]++; > else if(a==3)b[3]++; > else if(a>=4) > for(int j=2;j<=c/2;++j) > { > > while((a%j)==0) > {a/=j;b[j]++;} > if(a==1)break; > } > } > long long num=1; > for(int i=0;i<10000;++i) > if(b[i])num*=(b[i]+1); > cout<<num<<endl; > getchar(); > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator