1 solutions
-
0
C++ :
#include <stdio.h> int t,a,b; int main(){ //freopen("input.in","r",stdin); //freopen("input.out","w",stdout); scanf("%d",&t); while(t--){ scanf("%d%d",&a,&b); if(a == b){ puts("no"); continue; } double a1 = a*1.0*a/b/b; double q = (2.0*a*b)/(a*1.0*a + b*1.0*b); printf("%.4lf\n",a1 / (1-q)); } return 0; }
- 1
Information
- ID
- 18347
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By