/*
* =====================================================================================
*
* Filename: 1017.c
*
* Description:
*
* Version: 1.0
* Created: 2011年12月16日 10时33分42秒
* Revision: none
* Compiler: gcc
*
* Author: MaZheng (blog.youkuaiyun.com/mazheng1989), mazheng19891019@gmail.com
* Company: Dalian University Of Technology
*
* =====================================================================================
*/
#include<stdio.h>
//please declare parameters here.
int cc[]={0,5,3,1};
int bb[]={0,7,6,5};
int a,b,c,d,e,f;
int num;
//please declare functions here.
int main()
{
freopen("input.txt","r",stdin);
//input your ...
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)
{
if(a+b+c+d+e+f==0)
break;
printf("%d %d %d %d %d %d\n",a,b,c,d,e,f);
num=d+e+f+(c+3)/4;
a-=11*e;
b-=5*d;
c=c%4;
b-=cc[c];
a-=bb[c];
if(b>0)
{
num+=(b+8)/9;
b=b-(b+8)/9*9;
}
a+=4*b;
if(a>0)
{
num+=(a+35)/36;
}
printf("%d\n",num);
}
return 0;
}
poj1017
最新推荐文章于 2018-08-21 21:26:50 发布
616

被折叠的 条评论
为什么被折叠?



