题解 | #牛牛的并联电路#
牛牛的并联电路
http://www.nowcoder.com/practice/6e13936b6fc54f52ac22efd6c8e7fef3
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); double one = scanner.nextDouble(); double two = scanner.nextDouble(); System.out.printf("%.1f", 1.0 / ( 1.0 / one + 1.0 / two)); } }