結果

問題 No.1700 floor X
ユーザー みーすけみーすけ
提出日時 2021-10-08 22:27:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 1,953 ms
コンパイル使用メモリ 72,048 KB
実行使用メモリ 62,388 KB
最終ジャッジ日時 2023-09-30 11:00:18
合計ジャッジ時間 20,908 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 377 ms
60,872 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 368 ms
60,264 KB
testcase_09 AC 376 ms
60,296 KB
testcase_10 AC 371 ms
60,500 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 375 ms
60,692 KB
testcase_15 AC 379 ms
60,768 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 371 ms
62,016 KB
testcase_20 WA -
testcase_21 AC 403 ms
60,696 KB
testcase_22 AC 406 ms
60,544 KB
testcase_23 AC 399 ms
60,512 KB
testcase_24 AC 409 ms
60,788 KB
testcase_25 AC 402 ms
60,684 KB
testcase_26 AC 405 ms
60,844 KB
testcase_27 AC 393 ms
60,364 KB
testcase_28 AC 411 ms
62,388 KB
testcase_29 AC 402 ms
60,472 KB
testcase_30 AC 397 ms
60,352 KB
testcase_31 AC 403 ms
60,736 KB
testcase_32 AC 409 ms
60,364 KB
testcase_33 AC 406 ms
60,808 KB
testcase_34 AC 387 ms
60,884 KB
testcase_35 AC 403 ms
60,452 KB
testcase_36 AC 393 ms
61,080 KB
testcase_37 AC 414 ms
60,496 KB
testcase_38 AC 413 ms
60,660 KB
testcase_39 AC 392 ms
60,776 KB
testcase_40 AC 387 ms
60,444 KB
testcase_41 AC 394 ms
60,292 KB
testcase_42 AC 123 ms
56,216 KB
testcase_43 AC 397 ms
60,364 KB
testcase_44 AC 411 ms
60,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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

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

}
0