hdu1085Holding Bin-Laden Captive!-简单题

hdu1085Holding Bin-Laden Captive!


#include<iostream>
using namespace std;


int main()
{
	int n1,n2,n5;
	while(scanf("%d%d%d",&n1,&n2,&n5),n1+n2+n5)
	{
		if(n1==0)	printf("1\n");
		else	if(2*n2+n1<4)	printf("%d\n",2*n2+n1+1);
				else	printf("%d\n",5*n5+2*n2+n1+1);
	}
	
	return 0;
}



你可能感兴趣的:(hdu1085Holding Bin-Laden Captive!-简单题)