結果

問題 No.537 ユーザーID
ユーザー mosmos_21mosmos_21
提出日時 2017-06-30 23:47:53
言語 Java19
(openjdk 21)
結果
AC  
実行時間 221 ms / 2,000 ms
コード長 535 bytes
コンパイル時間 4,486 ms
コンパイル使用メモリ 76,260 KB
実行使用メモリ 59,964 KB
最終ジャッジ日時 2023-07-27 20:31:21
合計ジャッジ時間 11,236 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,868 KB
testcase_01 AC 128 ms
55,516 KB
testcase_02 AC 131 ms
55,620 KB
testcase_03 AC 126 ms
55,568 KB
testcase_04 AC 127 ms
55,272 KB
testcase_05 AC 126 ms
55,796 KB
testcase_06 AC 128 ms
55,536 KB
testcase_07 AC 128 ms
55,816 KB
testcase_08 AC 127 ms
55,732 KB
testcase_09 AC 129 ms
55,636 KB
testcase_10 AC 130 ms
55,256 KB
testcase_11 AC 128 ms
55,648 KB
testcase_12 AC 131 ms
55,720 KB
testcase_13 AC 130 ms
55,660 KB
testcase_14 AC 130 ms
55,520 KB
testcase_15 AC 130 ms
55,208 KB
testcase_16 AC 128 ms
55,492 KB
testcase_17 AC 130 ms
55,636 KB
testcase_18 AC 155 ms
56,088 KB
testcase_19 AC 147 ms
55,576 KB
testcase_20 AC 146 ms
55,436 KB
testcase_21 AC 152 ms
55,556 KB
testcase_22 AC 157 ms
55,908 KB
testcase_23 AC 162 ms
56,000 KB
testcase_24 AC 139 ms
55,508 KB
testcase_25 AC 160 ms
55,808 KB
testcase_26 AC 159 ms
55,804 KB
testcase_27 AC 154 ms
55,896 KB
testcase_28 AC 191 ms
55,964 KB
testcase_29 AC 221 ms
59,488 KB
testcase_30 AC 210 ms
59,964 KB
testcase_31 AC 152 ms
56,468 KB
testcase_32 AC 151 ms
55,876 KB
testcase_33 AC 213 ms
59,576 KB
testcase_34 AC 161 ms
56,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package test;

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

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