← Back to List

6502번: 동혁 피자 ↗

Solutions

C++14
294 B | 294 chars
#include <iostream>
using namespace std;
int R,A,B,K=1;
int main()
{
	while(1)
	{
		cin>>R;
		if(R==0) return 0;
		else
		{
			cin>>A>>B;
			if(4*R*R>=A*A+B*B)
			{
				cout<<"Pizza "<<K<<" fits on the table.\n";
			}
			else cout<<"Pizza "<<K<<" does not fit on the table.\n";
			K++;
		}
	}
}