4 条题解

  • 2
    @ 2026-1-26 14:41:15
    #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;
     }
    • 2
      @ 2022-8-29 16:11:03
      #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;
      } 
      
      • 0
        @ 2026-3-15 22:17:40

        #include<bits/stdc++.h> using namespace std;

        int main(){ float r1,r2; cin>>r1>>r2; cout<<fixed<<setprecision(2)<<1/((1/r1)+(1/r2)); return 0; }

        #include<bits/stdc++.h>
        using namespace std;
        
        int main(){
        	float r1,r2;
        	cin>>r1>>r2;
        	cout<<fixed<<setprecision(2)<<1/((1/r1)+(1/r2));
        	return 0;
        }
        
        • -2
          @ 2023-3-13 17:08:57
          #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;
          } 
          
          • 1

          信息

          ID
          820
          时间
          1000ms
          内存
          128MiB
          难度
          2
          标签
          递交数
          118
          已通过
          74
          上传者