結果

問題 No.1700 floor X
ユーザー AsahiAsahi
提出日時 2023-02-06 07:33:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 343 ms / 2,000 ms
コード長 805 bytes
コンパイル時間 1,966 ms
コンパイル使用メモリ 71,908 KB
実行使用メモリ 61,940 KB
最終ジャッジ日時 2023-09-17 19:49:45
合計ジャッジ時間 17,440 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,364 KB
testcase_01 AC 284 ms
60,444 KB
testcase_02 AC 288 ms
60,400 KB
testcase_03 AC 285 ms
60,100 KB
testcase_04 AC 292 ms
59,888 KB
testcase_05 AC 294 ms
60,444 KB
testcase_06 AC 300 ms
60,076 KB
testcase_07 AC 288 ms
60,388 KB
testcase_08 AC 281 ms
60,244 KB
testcase_09 AC 292 ms
60,316 KB
testcase_10 AC 298 ms
60,184 KB
testcase_11 AC 284 ms
60,224 KB
testcase_12 AC 284 ms
60,160 KB
testcase_13 AC 281 ms
60,596 KB
testcase_14 AC 281 ms
60,096 KB
testcase_15 AC 286 ms
59,960 KB
testcase_16 AC 284 ms
60,304 KB
testcase_17 AC 296 ms
60,368 KB
testcase_18 AC 294 ms
60,140 KB
testcase_19 AC 288 ms
60,092 KB
testcase_20 AC 287 ms
60,560 KB
testcase_21 AC 343 ms
60,240 KB
testcase_22 AC 339 ms
60,616 KB
testcase_23 AC 327 ms
60,088 KB
testcase_24 AC 323 ms
60,920 KB
testcase_25 AC 325 ms
60,412 KB
testcase_26 AC 329 ms
60,680 KB
testcase_27 AC 335 ms
60,152 KB
testcase_28 AC 338 ms
60,472 KB
testcase_29 AC 323 ms
60,592 KB
testcase_30 AC 334 ms
60,528 KB
testcase_31 AC 328 ms
61,940 KB
testcase_32 AC 331 ms
60,436 KB
testcase_33 AC 337 ms
60,396 KB
testcase_34 AC 332 ms
60,160 KB
testcase_35 AC 330 ms
60,368 KB
testcase_36 AC 329 ms
60,404 KB
testcase_37 AC 324 ms
60,192 KB
testcase_38 AC 337 ms
60,536 KB
testcase_39 AC 335 ms
60,576 KB
testcase_40 AC 327 ms
60,216 KB
testcase_41 AC 323 ms
60,300 KB
testcase_42 AC 123 ms
55,888 KB
testcase_43 AC 328 ms
60,872 KB
testcase_44 AC 334 ms
59,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;
// import java.util.stream.Stream;

class Main{
    static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st;
    static PrintWriter output = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws IOException{
        int t = sc.nextInt();
        while(t-->0) {
            long n = sc.nextLong();
            long left = 1;
            long right = (long)1e9+1;
            while(right -left > 1) {
                long mid = (left + right) / 2;
                if((mid*mid) <= n) left = mid;
                else right = mid;
            }
            output.println(left);
        }
        output.flush();
    }
}
0