mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
1c7c39b791
4200-4299
34 lines
630 B
C++
34 lines
630 B
C++
#include<iostream>
|
|
using namespace std;
|
|
struct node
|
|
{
|
|
int d;
|
|
int p;
|
|
};
|
|
typedef int Case;
|
|
node nod[10];
|
|
const double PI=3.1415926;
|
|
int main()
|
|
{
|
|
int n;
|
|
Case cas=1;
|
|
while(cin>>n,n)
|
|
{
|
|
double min=1000000,area,sq;
|
|
int rem;
|
|
for(int i=0;i<n;i++)
|
|
{
|
|
cin>>nod[i].d>>nod[i].p;
|
|
area=PI*(nod[i].d/2.0)*(nod[i].d/2.0);
|
|
sq=nod[i].p/area;
|
|
if(min>sq)
|
|
{
|
|
min=sq;
|
|
rem=nod[i].d;
|
|
}
|
|
}
|
|
cout<<"Menu "<<cas++<<": "<<rem<<endl;
|
|
}
|
|
return 0;
|
|
}
|