import java.util.Scanner; public class mazi { public static void main(String[] args) { Scanner sc =new Scanner(System.in); int T=sc.nextInt(); while (T-- >0){ double n = sc.nextDouble(); double m =sc.nextDouble(); if(n<=m) System.out.println("0.000000"); else System.out.printf("%.6f\n",1+ Math.log(n/m));//printf为什么不行 // System.out.printf("%.6f\n", 1 + Math.log(n / m)); } }}
全部评论
(1) 回帖