| ||||||||||
| 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 | |||||||||
为什么WA!?#include<stdio.h>
void main()
{
int a[16];
int i,j,count=0,k;
while(scanf("%d",&a[0]),a[0]!=-1)
{
i=1;
while(scanf("%d",&a[i]),a[i])
i++;
for(j=0;j<i-1;j++)
for(k=1;k<i;k++)
if(a[j]*2==a[k])
++count;
printf("%d\n",count);
count=0;
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator