#include<stdio.h> int main(){ float r1 = 0; float r2 = 0; float R = 0; scanf("%f %f",&r1,&r2); R = 1.0f/(1.0f/r1+1.0f/r2);//总电阻 printf("%.1f\n",R); return 0; }
#include<stdio.h> int main(){ float r1 = 0; float r2 = 0; float R = 0; scanf("%f %f",&r1,&r2); R = 1.0f/(1.0f/r1+1.0f/r2);//总电阻 printf("%.1f\n",R); return 0; }