Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么错呢,看看吧

Posted by youyou at 2007-07-18 11:27:24 on Problem 1552
#include <stdio.h>
int main()
{
  int s[20],i,j,k,a,b;
    scanf("%d",&s[0]);
    while(s[0]!=-1)
    {
    k=0;
    for(i=0;s[i]>0;)
        scanf("%d",&s[++i]);
    for(j=0;j<i-1;j++)
    {
        for(b=0;b<i-1;b++)
        if(s[b]==2*s[j])
        k++;
    }
    printf("%d\n",k);
    scanf("%d",&s[0]);
    }

}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator