結果

問題 No.537 ユーザーID
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-11 00:28:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 2,285 ms
コンパイル使用メモリ 75,972 KB
実行使用メモリ 45,488 KB
最終ジャッジ日時 2024-04-24 10:55:15
合計ジャッジ時間 7,321 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
41,044 KB
testcase_01 AC 100 ms
40,408 KB
testcase_02 AC 118 ms
41,436 KB
testcase_03 AC 117 ms
40,360 KB
testcase_04 AC 114 ms
41,228 KB
testcase_05 AC 102 ms
40,032 KB
testcase_06 AC 108 ms
40,084 KB
testcase_07 AC 109 ms
41,284 KB
testcase_08 AC 100 ms
40,028 KB
testcase_09 AC 109 ms
41,076 KB
testcase_10 AC 100 ms
40,436 KB
testcase_11 AC 101 ms
40,364 KB
testcase_12 AC 118 ms
41,416 KB
testcase_13 AC 116 ms
41,280 KB
testcase_14 AC 118 ms
41,324 KB
testcase_15 AC 116 ms
41,128 KB
testcase_16 AC 114 ms
41,308 KB
testcase_17 AC 100 ms
40,320 KB
testcase_18 AC 136 ms
41,288 KB
testcase_19 AC 121 ms
40,292 KB
testcase_20 AC 125 ms
41,404 KB
testcase_21 AC 119 ms
41,188 KB
testcase_22 AC 127 ms
41,424 KB
testcase_23 AC 143 ms
41,572 KB
testcase_24 AC 113 ms
40,564 KB
testcase_25 AC 137 ms
41,420 KB
testcase_26 AC 142 ms
41,388 KB
testcase_27 AC 142 ms
41,436 KB
testcase_28 AC 167 ms
42,844 KB
testcase_29 AC 186 ms
45,488 KB
testcase_30 AC 174 ms
44,788 KB
testcase_31 AC 130 ms
41,312 KB
testcase_32 AC 131 ms
41,536 KB
testcase_33 AC 175 ms
45,088 KB
testcase_34 AC 131 ms
41,364 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());
				StringBuilder sb2 = new StringBuilder();
				sb2.append(String.valueOf(n/i));
				sb2.append(String.valueOf(i));
				set.add(sb2.toString());
			}
		}
		System.out.println(set.size());
	}
}
0