| ||||||||||
| 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 | |||||||||
各位老大:帮忙看看怎么会输不出结果#include<stdio.h>
int main()
{ int i,j,k,a[101],b[101],n,g;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d",&a[i]);
int t=0,p=-1,m=0;
for (j=1;j<=a[i];j++)
{for(k=1;k<=a[i];k++)
if(j%k==0){p=-p;t=t+p;}
if(t=1) m++;}
b[i]=m;}
for(i=0;i<n;i++)
printf("%d\n",b[i]);
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator