結果

問題 No.537 ユーザーID
ユーザー YamaKasaYamaKasa
提出日時 2018-06-04 21:08:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 579 bytes
コンパイル時間 4,532 ms
コンパイル使用メモリ 74,648 KB
実行使用メモリ 59,904 KB
最終ジャッジ日時 2023-09-12 22:15:55
合計ジャッジ時間 11,545 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,636 KB
testcase_01 AC 125 ms
55,996 KB
testcase_02 AC 124 ms
55,924 KB
testcase_03 AC 125 ms
55,916 KB
testcase_04 AC 124 ms
55,628 KB
testcase_05 AC 122 ms
55,920 KB
testcase_06 AC 121 ms
55,628 KB
testcase_07 AC 121 ms
56,028 KB
testcase_08 AC 123 ms
55,992 KB
testcase_09 AC 122 ms
55,772 KB
testcase_10 AC 126 ms
56,224 KB
testcase_11 AC 121 ms
55,620 KB
testcase_12 AC 121 ms
55,848 KB
testcase_13 AC 121 ms
55,696 KB
testcase_14 AC 119 ms
55,624 KB
testcase_15 AC 121 ms
55,720 KB
testcase_16 AC 125 ms
55,996 KB
testcase_17 AC 121 ms
55,896 KB
testcase_18 AC 153 ms
56,964 KB
testcase_19 AC 140 ms
55,868 KB
testcase_20 AC 138 ms
56,092 KB
testcase_21 AC 151 ms
57,400 KB
testcase_22 AC 156 ms
56,872 KB
testcase_23 AC 159 ms
56,860 KB
testcase_24 AC 136 ms
55,372 KB
testcase_25 AC 161 ms
56,944 KB
testcase_26 AC 158 ms
57,148 KB
testcase_27 AC 153 ms
56,848 KB
testcase_28 AC 181 ms
57,704 KB
testcase_29 AC 209 ms
59,900 KB
testcase_30 AC 202 ms
59,904 KB
testcase_31 AC 151 ms
57,100 KB
testcase_32 AC 149 ms
57,244 KB
testcase_33 AC 200 ms
59,500 KB
testcase_34 AC 163 ms
57,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		long N = scan.nextLong();
		scan.close();
		Set<String> hash_set = new HashSet<String>();
		int k = (int)Math.sqrt(N);
		for(int i = 1; i <= k; i++) {
			if(N % i == 0) {
				long t = N / i;
				String s1 = Integer.toString(i) + Long.toString(t);
				String s2 = Long.toString(t) + Integer.toString(i);
				hash_set.add(s1);
				hash_set.add(s2);
			}
		}
		System.out.println(hash_set.size());
	}
}
0