Codeforces Round #386 (Div. 2), problem: (A) Compote Solution in C/C++

Codeforces Round #386 (Div. 2), problem: (A) Compote Solution in C/C++


#include<stdio.h>
int main()
{
	int a,b,c,i;
	scanf("%d%d%d",&a,&b,&c);
	for(i=a;i>=1;i--)
		if(b>=2*i&&c>=4*i)
			break;
	printf("%d",7*i);
}

Leave a Reply

Your email address will not be published. Required fields are marked *