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

为什么wa啊,帮忙看下

Posted by 200810446 at 2009-06-25 19:37:18 on Problem 1017
#include <stdio.h>
int main()
{
 int a[7]={0,1,4,9,16,25,36};
 int b[7];
 int i;
 int total,count;
 for(i=1;i<=6;i++)
 scanf("%d",&b[i]);
 while(b[1]!=0||b[2]!=0||b[3]!=0||b[4]!=0||b[5]!=0||b[6]!=0)
 {
  total=0;
  for(i=1;i<=6;i++)
  total+=a[i]*b[i];
  //printf("%d\n",total);
  if(total%36==0)
  count=total/36;
  else
  count=total/36+1;
  printf("%d\n",count);
  for(i=1;i<=6;i++)
  scanf("%d",&b[i]);
 }
 //getch();
 return 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