| ||||||||||
| 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 | |||||||||
Re:谁能帮我看看我的程序那儿错了?In Reply To:谁能帮我看看我的程序那儿错了? Posted by:bingshen at 2010-03-13 11:25:25 > #include<stdio.h>
> const int u[4]={0,5,3,1};
> int main()
> {
> int a[7],m,k,t,sum,i,left1,left2;
> while(1)
> {
> for(i=1;i<7;i++)
> scanf("%d",&a[i]);
> if(a[1]+a[2]+a[3]+a[4]+a[5]+a[6]==0)
> break;
> sum=a[4]+a[5]+a[6];
> k=a[3]/4;
> if(k>0)
> sum+=k;
> if(a[3]%4)
> sum++;
> left1=a[4]*5+u[a[3]%4];
> if(a[2]>left1)
> {
> m=(a[2]-left1)/9;
> if(m>0) m被9整除呢?
> sum+=(m+1);
> else
> sum++;
> }
> left2=sum*36-a[6]*36-a[5]*25-a[4]*16-a[3]*9-a[2]*4;
> if(a[1]>left2)
> {
> t=(a[1]-left1)/36;
> if(t>0)
> sum+=(t+1);
> else
> sum++;
> }
> printf("%d\n",sum);
> }
> return 0;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator