結果

問題 No.537 ユーザーID
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 00:17:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 465 bytes
コンパイル時間 1,935 ms
コンパイル使用メモリ 75,428 KB
実行使用メモリ 46,968 KB
最終ジャッジ日時 2024-04-24 10:37:39
合計ジャッジ時間 7,747 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
46,704 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 117 ms
40,296 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 109 ms
41,040 KB
testcase_10 AC 112 ms
41,300 KB
testcase_11 AC 110 ms
40,260 KB
testcase_12 AC 110 ms
40,948 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 114 ms
41,256 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
権限があれば一括ダウンロードができます

ソースコード

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<=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