結果

問題 No.1162 Many Quotients hard
ユーザー tentententen
提出日時 2020-08-17 16:59:19
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 380 bytes
コンパイル時間 2,884 ms
コンパイル使用メモリ 75,084 KB
実行使用メモリ 47,000 KB
最終ジャッジ日時 2024-10-11 13:27:44
合計ジャッジ時間 9,197 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
46,348 KB
testcase_01 AC 144 ms
41,440 KB
testcase_02 AC 135 ms
41,296 KB
testcase_03 AC 140 ms
41,184 KB
testcase_04 AC 141 ms
41,140 KB
testcase_05 AC 141 ms
41,500 KB
testcase_06 AC 140 ms
40,864 KB
testcase_07 AC 137 ms
41,208 KB
testcase_08 AC 139 ms
41,232 KB
testcase_09 AC 135 ms
41,304 KB
testcase_10 AC 145 ms
41,320 KB
testcase_11 AC 146 ms
41,320 KB
testcase_12 AC 138 ms
41,408 KB
testcase_13 AC 139 ms
41,276 KB
testcase_14 AC 146 ms
41,272 KB
testcase_15 AC 141 ms
41,016 KB
testcase_16 AC 142 ms
41,168 KB
testcase_17 AC 143 ms
41,056 KB
testcase_18 AC 135 ms
41,368 KB
testcase_19 AC 129 ms
41,088 KB
testcase_20 AC 145 ms
40,988 KB
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long idx = (long)Math.sqrt(n);
        long count = idx;
        idx++;
        while (n >= idx) {
            count++;
            idx = n / (n / idx) + 1;
        }
        System.out.println(count);
    }
}
0