結果

問題 No.537 ユーザーID
ユーザー shinwisteria
提出日時 2018-03-13 19:45:50
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 482 bytes
コンパイル時間 3,493 ms
コンパイル使用メモリ 75,384 KB
実行使用メモリ 41,552 KB
最終ジャッジ日時 2024-11-22 16:16:11
合計ジャッジ時間 9,116 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 RE * 17
権限があれば一括ダウンロードができます

ソースコード

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