結果

問題 No.537 ユーザーID
ユーザー samplelpmassamplelpmas
提出日時 2017-07-02 08:04:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 217 ms / 2,000 ms
コード長 633 bytes
コンパイル時間 2,875 ms
コンパイル使用メモリ 77,240 KB
実行使用メモリ 57,336 KB
最終ジャッジ日時 2024-04-15 11:29:37
合計ジャッジ時間 9,123 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
53,936 KB
testcase_01 AC 138 ms
54,260 KB
testcase_02 AC 136 ms
53,712 KB
testcase_03 AC 140 ms
53,860 KB
testcase_04 AC 135 ms
54,228 KB
testcase_05 AC 139 ms
53,964 KB
testcase_06 AC 136 ms
54,004 KB
testcase_07 AC 137 ms
54,028 KB
testcase_08 AC 136 ms
53,956 KB
testcase_09 AC 137 ms
54,208 KB
testcase_10 AC 139 ms
54,120 KB
testcase_11 AC 135 ms
53,824 KB
testcase_12 AC 137 ms
53,864 KB
testcase_13 AC 138 ms
53,896 KB
testcase_14 AC 136 ms
53,792 KB
testcase_15 AC 139 ms
54,316 KB
testcase_16 AC 139 ms
54,224 KB
testcase_17 AC 139 ms
53,872 KB
testcase_18 AC 175 ms
54,908 KB
testcase_19 AC 158 ms
53,980 KB
testcase_20 AC 156 ms
54,188 KB
testcase_21 AC 170 ms
55,168 KB
testcase_22 AC 173 ms
55,180 KB
testcase_23 AC 178 ms
55,052 KB
testcase_24 AC 147 ms
54,072 KB
testcase_25 AC 175 ms
55,088 KB
testcase_26 AC 174 ms
55,164 KB
testcase_27 AC 170 ms
54,976 KB
testcase_28 AC 194 ms
55,900 KB
testcase_29 AC 217 ms
55,240 KB
testcase_30 AC 205 ms
55,508 KB
testcase_31 AC 176 ms
55,008 KB
testcase_32 AC 169 ms
55,220 KB
testcase_33 AC 212 ms
57,336 KB
testcase_34 AC 178 ms
55,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();

        Set<String> hs = new HashSet<String>();

        for (long i = 1; i * i <= N; i++) {

            if (N % i == 0) {

                String factorStr1 = Long.toString(i);
                String factorStr2 = Long.toString(N / i);

                hs.add(factorStr1 + factorStr2);
                hs.add(factorStr2 + factorStr1);

            }

        }

        System.out.println(hs.size());

    }

}
0