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 |
那说明它本来就是错的In Reply To:为煞//这个程序在编译器上正确 提交时却 错误 Posted by:guanmeng at 2007-05-25 17:30:36 > #include<iostream.h> > int x; > void main() > { > int i,j=0,b[101],a[101]; > cin>>i; > for(int k=0;k<i;k++) > cin>>b[k]; > k=0; > while(j<i) > { > for(int n=1;n<=b[k];n++) > a[n]=1; > for(n=2;n<=b[k];n++) > { > for(int m=1;m<=b[k];m++) > { > if(m%n==0) > a[m]=(a[m]+1)%2; > } > } > x=0; > for(int l=1;l<=b[k];l++) > { > > if(a[l]==1) > x++; > } > cout<<x<<endl; > j++;k++; > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator