hdu_5761_Rower Bo(xjb猜公式)
题目链接:hdu_5761_Rower Bo
题意:
让你求一个物理问题
题解:
xjb猜公式,由题目样例可得,答案为8/7,然后我们可以xjb猜出公式为v1*a/(v1*v1-v2*v2),然后特判一下a=0和v1<=v2的情况就OK
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include<bits/stdc++.h> 2 int main(){ 3 int a,v1,v2; 4 while(~scanf("%d%d%d",&a,&v1,&v2)) 5 { 6 if(a==0)puts("0"); 7 else if(v1<=v2)puts("Infinity"); 8 else printf("%.10lf\n",(double)v1*a/((v1*v1)-(v2*v2))); 9 } 10 return 0; 11 }