結果

問題 No.1700 floor X
ユーザー みーすけみーすけ
提出日時 2021-10-08 22:30:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 410 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 2,434 ms
コンパイル使用メモリ 71,596 KB
実行使用メモリ 61,304 KB
最終ジャッジ日時 2023-09-16 09:17:29
合計ジャッジ時間 21,793 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,120 KB
testcase_01 AC 372 ms
60,704 KB
testcase_02 AC 349 ms
60,724 KB
testcase_03 AC 406 ms
60,476 KB
testcase_04 AC 367 ms
60,316 KB
testcase_05 AC 383 ms
61,304 KB
testcase_06 AC 365 ms
60,636 KB
testcase_07 AC 357 ms
58,104 KB
testcase_08 AC 363 ms
58,644 KB
testcase_09 AC 369 ms
60,240 KB
testcase_10 AC 373 ms
60,464 KB
testcase_11 AC 356 ms
60,100 KB
testcase_12 AC 351 ms
60,792 KB
testcase_13 AC 360 ms
60,456 KB
testcase_14 AC 362 ms
60,564 KB
testcase_15 AC 360 ms
60,304 KB
testcase_16 AC 352 ms
60,656 KB
testcase_17 AC 366 ms
60,284 KB
testcase_18 AC 353 ms
60,636 KB
testcase_19 AC 366 ms
60,960 KB
testcase_20 AC 368 ms
60,056 KB
testcase_21 AC 402 ms
60,504 KB
testcase_22 AC 405 ms
60,524 KB
testcase_23 AC 395 ms
60,764 KB
testcase_24 AC 399 ms
60,444 KB
testcase_25 AC 392 ms
60,556 KB
testcase_26 AC 394 ms
60,516 KB
testcase_27 AC 394 ms
60,432 KB
testcase_28 AC 406 ms
60,528 KB
testcase_29 AC 390 ms
60,356 KB
testcase_30 AC 408 ms
60,336 KB
testcase_31 AC 406 ms
60,240 KB
testcase_32 AC 399 ms
60,500 KB
testcase_33 AC 385 ms
60,480 KB
testcase_34 AC 399 ms
60,704 KB
testcase_35 AC 402 ms
60,456 KB
testcase_36 AC 395 ms
60,868 KB
testcase_37 AC 410 ms
60,576 KB
testcase_38 AC 405 ms
60,628 KB
testcase_39 AC 410 ms
60,476 KB
testcase_40 AC 394 ms
60,808 KB
testcase_41 AC 399 ms
60,312 KB
testcase_42 AC 124 ms
56,220 KB
testcase_43 AC 388 ms
60,924 KB
testcase_44 AC 381 ms
60,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int t = sc.nextInt();
        start: for (int i = 0; i < t; i++) {
            long n = sc.nextLong();
            for (long j = (int) (Math.sqrt(n) - 1); j <= n+1; j++) {
                if (j * j > n) {
                    System.out.println(j - 1);
                    continue start;
                }
            }
        }
    }

}
0