結果

問題 No.1700 floor X
ユーザー みーすけ
提出日時 2021-10-08 22:27:17
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 2,071 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 59,584 KB
最終ジャッジ日時 2024-07-23 05:05:25
合計ジャッジ時間 21,467 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 31 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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