贡献一个B题的思路,求log2(n) + 1就是结果🤣 while (in.hasNextInt()) { int T = in.nextInt(); while (T-- != 0) { long n = in.nextLong(); out.println(1 + (int) Math.ceil(Math.log(n) / Math.log(2))); } }