#include"stdio.h"
#include"string.h"
#include"stdlib.h"
int min(int a,int b)
{
return a>b?b:a;
}
int main()
{
int T,Case;
int temp;
int a,b,c;
int ans;
scanf("%d",&T);
for(Case=1;Case<=T;Case++)
{
scanf("%d%d%d",&a,&b,&c);
ans=0;
//72
temp=min(a/2,c);
ans+=temp;a-=temp*2;c-=temp;
//68
temp=min(a/2,b);
ans+=temp;a-=temp*2;b-=temp;
//2*32=64
ans+=c/2;c-=c/2*2;
//28+32=60
temp=min(b,c);
ans+=temp;b-=temp;c-=temp;
//3*20=60
ans+=a/3;a-=a/3*3;
//2*28=56
ans+=b/2;b-=b/2*2;
//20+32=52
temp=min(a,c);
ans+=temp;a-=temp;c-=temp;
//20+28
temp=min(a,b);
ans+=temp;a-=temp;b-=temp;
//单
ans+=a/3+!(a%3==0);
ans+=b/2+!(b%2==0);
ans+=c/2+!(c%2==0);
printf("Case %d: %d\n",Case,ans);
}
return 0;
}
07-13
07-13
07-13
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交