結果

問題 No.537 ユーザーID
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 00:25:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 476 bytes
コンパイル時間 1,900 ms
コンパイル使用メモリ 75,176 KB
実行使用メモリ 56,712 KB
最終ジャッジ日時 2024-04-24 10:49:14
合計ジャッジ時間 7,345 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
41,396 KB
testcase_01 AC 117 ms
41,684 KB
testcase_02 AC 108 ms
41,520 KB
testcase_03 WA -
testcase_04 AC 116 ms
41,312 KB
testcase_05 WA -
testcase_06 AC 115 ms
40,092 KB
testcase_07 AC 116 ms
41,584 KB
testcase_08 AC 101 ms
41,548 KB
testcase_09 AC 105 ms
39,916 KB
testcase_10 AC 116 ms
40,384 KB
testcase_11 AC 113 ms
40,032 KB
testcase_12 AC 110 ms
41,496 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 100 ms
41,308 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 137 ms
41,520 KB
testcase_19 AC 121 ms
41,268 KB
testcase_20 AC 139 ms
41,712 KB
testcase_21 AC 121 ms
41,228 KB
testcase_22 AC 137 ms
41,544 KB
testcase_23 AC 135 ms
41,432 KB
testcase_24 AC 127 ms
41,520 KB
testcase_25 AC 132 ms
41,984 KB
testcase_26 WA -
testcase_27 AC 127 ms
41,428 KB
testcase_28 AC 152 ms
43,824 KB
testcase_29 AC 179 ms
44,796 KB
testcase_30 AC 177 ms
44,836 KB
testcase_31 AC 143 ms
41,856 KB
testcase_32 AC 133 ms
41,640 KB
testcase_33 WA -
testcase_34 AC 138 ms
41,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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