题解 | 牛牛的并联电路
牛牛的并联电路
https://www.nowcoder.com/practice/6e13936b6fc54f52ac22efd6c8e7fef3
#include <stdio.h> int main() { int r1 = 0; int r2 = 0; scanf("%d %d", &r1, &r2); printf("%.1f\n", 1.0 / ((1.0 / r1) + (1.0 / r2))); return 0; }
牛牛的并联电路
https://www.nowcoder.com/practice/6e13936b6fc54f52ac22efd6c8e7fef3
#include <stdio.h> int main() { int r1 = 0; int r2 = 0; scanf("%d %d", &r1, &r2); printf("%.1f\n", 1.0 / ((1.0 / r1) + (1.0 / r2))); return 0; }
相关推荐