結果

問題 No.537 ユーザーID
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 00:13:15
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 476 bytes
コンパイル時間 3,693 ms
コンパイル使用メモリ 74,852 KB
実行使用メモリ 44,696 KB
最終ジャッジ日時 2024-04-24 10:32:50
合計ジャッジ時間 10,203 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
41,296 KB
testcase_01 AC 104 ms
41,612 KB
testcase_02 AC 117 ms
41,168 KB
testcase_03 WA -
testcase_04 AC 107 ms
41,264 KB
testcase_05 WA -
testcase_06 AC 115 ms
41,464 KB
testcase_07 AC 113 ms
41,280 KB
testcase_08 AC 112 ms
41,408 KB
testcase_09 AC 110 ms
41,424 KB
testcase_10 AC 117 ms
41,448 KB
testcase_11 AC 117 ms
41,712 KB
testcase_12 AC 118 ms
41,544 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 126 ms
41,224 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 143 ms
41,552 KB
testcase_19 AC 135 ms
41,288 KB
testcase_20 AC 129 ms
41,380 KB
testcase_21 AC 136 ms
41,300 KB
testcase_22 AC 135 ms
41,580 KB
testcase_23 AC 136 ms
41,708 KB
testcase_24 AC 112 ms
41,448 KB
testcase_25 AC 130 ms
41,024 KB
testcase_26 WA -
testcase_27 AC 125 ms
41,364 KB
testcase_28 AC 155 ms
43,676 KB
testcase_29 AC 187 ms
44,532 KB
testcase_30 AC 168 ms
44,696 KB
testcase_31 AC 127 ms
41,484 KB
testcase_32 AC 136 ms
41,504 KB
testcase_33 WA -
testcase_34 AC 138 ms
41,436 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