結果

問題 No.1700 floor X
ユーザー xsdxsd
提出日時 2022-07-17 01:20:46
言語 OCaml
(5.1.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 486 bytes
コンパイル時間 1,760 ms
コンパイル使用メモリ 19,956 KB
実行使用メモリ 5,948 KB
最終ジャッジ日時 2023-09-11 11:45:18
合計ジャッジ時間 3,991 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 8 ms
5,864 KB
testcase_02 AC 8 ms
5,884 KB
testcase_03 AC 8 ms
5,680 KB
testcase_04 AC 8 ms
5,688 KB
testcase_05 AC 7 ms
5,688 KB
testcase_06 AC 8 ms
5,668 KB
testcase_07 AC 7 ms
5,864 KB
testcase_08 AC 8 ms
5,908 KB
testcase_09 AC 8 ms
5,868 KB
testcase_10 AC 8 ms
5,780 KB
testcase_11 AC 8 ms
5,664 KB
testcase_12 AC 8 ms
5,832 KB
testcase_13 AC 7 ms
5,816 KB
testcase_14 AC 8 ms
5,668 KB
testcase_15 AC 7 ms
5,904 KB
testcase_16 AC 7 ms
5,792 KB
testcase_17 AC 8 ms
5,672 KB
testcase_18 AC 8 ms
5,792 KB
testcase_19 AC 8 ms
5,800 KB
testcase_20 AC 8 ms
5,784 KB
testcase_21 AC 11 ms
5,868 KB
testcase_22 AC 10 ms
5,828 KB
testcase_23 AC 10 ms
5,708 KB
testcase_24 AC 10 ms
5,712 KB
testcase_25 AC 10 ms
5,720 KB
testcase_26 AC 10 ms
5,704 KB
testcase_27 AC 10 ms
5,828 KB
testcase_28 AC 10 ms
5,712 KB
testcase_29 AC 10 ms
5,836 KB
testcase_30 AC 10 ms
5,824 KB
testcase_31 AC 10 ms
5,828 KB
testcase_32 AC 10 ms
5,840 KB
testcase_33 AC 10 ms
5,824 KB
testcase_34 AC 10 ms
5,720 KB
testcase_35 AC 10 ms
5,836 KB
testcase_36 AC 10 ms
5,812 KB
testcase_37 AC 10 ms
5,836 KB
testcase_38 AC 10 ms
5,712 KB
testcase_39 AC 10 ms
5,912 KB
testcase_40 AC 11 ms
5,908 KB
testcase_41 AC 10 ms
5,712 KB
testcase_42 AC 2 ms
4,376 KB
testcase_43 AC 10 ms
5,840 KB
testcase_44 AC 10 ms
5,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Scanf.scanf "%d" (fun t ->
    for i = 1 to t do
        Scanf.scanf " %d" (fun n ->
            let nf2 = int_of_float (sqrt (float n)) - 2 in
            let nf1 = nf2 + 1 in
            let nf0 = nf1 + 1 in
            let nfm = nf0 + 1 in
            Printf.printf "%d\n" @@
            if nf2 * nf2 <= n && n < nf1 * nf1 then nf2 else
            if nf1 * nf1 <= n && n < nf0 * nf0 then nf1 else
            if nf0 * nf0 <= n && n < nfm * nfm then nf0 else nfm
        )
    done
)
0