#include<bits/stdc++.h> using namespace std; int main() { double a,b; scanf("%lf %lf",&a,&b); double ans=(1.0/a)+(1.0/b); printf("%.2lf",1.0/ans); return 0; }
#include <iostream> #include <iomanip> using namespace std; float r1,r2; int main() { cin >> r1 >> r2; cout << fixed << setprecision(2) << 1.0 / (1 / r1 + 1 / r2); return 0; }
注册一个 TeMenHu 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TeMenHu 通用账户