冬令营第四天
第一题
题解
#include <stdio.h>
#include <math.h>
int main(){
int v,v0,i=1;
double max=0,a;
int count=0;
while(1){
scanf("%d %d",&v,&v0);
if(v==0&&v0==0)
return 0;
while(v/i>v0){
a=i*0.3*sqrt(v/i-v0);
if(a>max){
max=a;
if(count!=i)
count=i;
else
printf("0\n");
}
i++;
}
printf("%d\n",count);
max=0;
count=0;
}
return 0;
}