标签:比较不水的
1 1 2
1
代码:
#include <stdio.h> #include <string.h> #include <math.h> int main(){ double s, u, v; int t; scanf("%d", &t); while( t --){ scanf("%lf%lf", &s, &u); v = 1.0/(tan(atan(1.0/s)-atan(1.0/u))); printf("%.lf\n", (u*v-s*(u+v))); //可以改成printf("%d\n", (int)(u*v-s*(u+v)+0.1)); } return 0; }
标签:比较不水的
原文地址:http://blog.csdn.net/shengweisong/article/details/40262679