結果

問題 No.537 ユーザーID
ユーザー htensaihtensai
提出日時 2019-12-07 17:15:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 256 ms / 2,000 ms
コード長 449 bytes
コンパイル時間 3,089 ms
コンパイル使用メモリ 76,196 KB
実行使用メモリ 59,940 KB
最終ジャッジ日時 2023-08-26 21:40:51
合計ジャッジ時間 11,225 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 162 ms
56,892 KB
testcase_01 AC 159 ms
55,140 KB
testcase_02 AC 160 ms
56,556 KB
testcase_03 AC 159 ms
56,808 KB
testcase_04 AC 158 ms
54,816 KB
testcase_05 AC 160 ms
56,712 KB
testcase_06 AC 158 ms
56,428 KB
testcase_07 AC 157 ms
56,424 KB
testcase_08 AC 158 ms
56,776 KB
testcase_09 AC 158 ms
57,060 KB
testcase_10 AC 158 ms
58,796 KB
testcase_11 AC 157 ms
56,936 KB
testcase_12 AC 156 ms
56,748 KB
testcase_13 AC 161 ms
56,516 KB
testcase_14 AC 156 ms
56,708 KB
testcase_15 AC 159 ms
56,720 KB
testcase_16 AC 159 ms
57,044 KB
testcase_17 AC 160 ms
57,116 KB
testcase_18 AC 182 ms
56,816 KB
testcase_19 AC 182 ms
56,756 KB
testcase_20 AC 179 ms
56,700 KB
testcase_21 AC 181 ms
57,024 KB
testcase_22 AC 184 ms
56,764 KB
testcase_23 AC 185 ms
56,540 KB
testcase_24 AC 167 ms
56,792 KB
testcase_25 AC 185 ms
56,632 KB
testcase_26 AC 184 ms
56,632 KB
testcase_27 AC 180 ms
56,780 KB
testcase_28 AC 230 ms
57,748 KB
testcase_29 AC 256 ms
58,520 KB
testcase_30 AC 246 ms
58,520 KB
testcase_31 AC 180 ms
57,112 KB
testcase_32 AC 176 ms
56,548 KB
testcase_33 AC 251 ms
59,940 KB
testcase_34 AC 185 ms
56,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        HashSet<String> set = new HashSet<>();
        for (long i = 1; i <= Math.sqrt(n); i++) {
            if (n % i == 0) {
                set.add((n / i) + "" + i);
                set.add(i + "" + (n / i));
            }
        }
        System.out.println(set.size());
    }
}
0