結果

問題 No.537 ユーザーID
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-08 21:21:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 285 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 2,442 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 47,508 KB
最終ジャッジ日時 2024-04-16 06:35:11
合計ジャッジ時間 10,750 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 176 ms
42,716 KB
testcase_01 AC 178 ms
42,648 KB
testcase_02 AC 177 ms
42,768 KB
testcase_03 AC 177 ms
42,796 KB
testcase_04 AC 175 ms
42,492 KB
testcase_05 AC 176 ms
42,512 KB
testcase_06 AC 175 ms
42,664 KB
testcase_07 AC 182 ms
42,716 KB
testcase_08 AC 178 ms
42,616 KB
testcase_09 AC 175 ms
42,808 KB
testcase_10 AC 172 ms
42,516 KB
testcase_11 AC 173 ms
42,796 KB
testcase_12 AC 182 ms
42,664 KB
testcase_13 AC 175 ms
42,900 KB
testcase_14 AC 175 ms
42,732 KB
testcase_15 AC 178 ms
42,572 KB
testcase_16 AC 177 ms
42,588 KB
testcase_17 AC 175 ms
42,768 KB
testcase_18 AC 210 ms
43,260 KB
testcase_19 AC 201 ms
43,044 KB
testcase_20 AC 200 ms
42,912 KB
testcase_21 AC 209 ms
42,856 KB
testcase_22 AC 219 ms
42,944 KB
testcase_23 AC 219 ms
42,928 KB
testcase_24 AC 186 ms
43,004 KB
testcase_25 AC 219 ms
42,800 KB
testcase_26 AC 217 ms
42,804 KB
testcase_27 AC 218 ms
44,136 KB
testcase_28 AC 264 ms
44,204 KB
testcase_29 AC 285 ms
46,524 KB
testcase_30 AC 276 ms
45,452 KB
testcase_31 AC 210 ms
43,052 KB
testcase_32 AC 221 ms
43,172 KB
testcase_33 AC 281 ms
47,508 KB
testcase_34 AC 221 ms
43,160 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<String>();
    for(long i = 1; i * i <= N; i++) {
      if(N % i == 0) {
        String s = "";
        s += i;
        s += (N / i);
        set.add(s);
        String t = "";
        t += (N / i);
        t += i;
        set.add(t);
      }
    }
    System.out.println(set.size());
  }
}
0