結果

問題 No.537 ユーザーID
ユーザー shinwisteriashinwisteria
提出日時 2018-03-13 19:45:50
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 482 bytes
コンパイル時間 4,418 ms
コンパイル使用メモリ 75,652 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2024-05-02 05:19:19
合計ジャッジ時間 8,857 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
41,228 KB
testcase_01 AC 132 ms
39,520 KB
testcase_02 AC 133 ms
41,316 KB
testcase_03 AC 132 ms
42,132 KB
testcase_04 AC 136 ms
41,848 KB
testcase_05 AC 137 ms
41,652 KB
testcase_06 AC 105 ms
40,932 KB
testcase_07 AC 113 ms
41,160 KB
testcase_08 AC 112 ms
41,356 KB
testcase_09 AC 100 ms
40,044 KB
testcase_10 AC 101 ms
40,212 KB
testcase_11 AC 113 ms
41,108 KB
testcase_12 AC 109 ms
41,360 KB
testcase_13 AC 101 ms
40,176 KB
testcase_14 AC 105 ms
40,248 KB
testcase_15 AC 101 ms
40,200 KB
testcase_16 AC 99 ms
39,816 KB
testcase_17 AC 105 ms
40,676 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.HashSet;
import java.util.Scanner;
public class Con537 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		s.close();

		HashSet<String> id = new HashSet<>();
		for(int i = 1;i <= Math.sqrt(n);i++){
			if(n % i == 0){
				String a = Integer.toString(i);
				String b = Integer.toString(n / i);
				id.add(a.concat(b));
				id.add(b.concat(a));
			}
		}
		System.out.println(id.size());

	}

}
0