結果

問題 No.677 10^Nの約数
ユーザー ohagi_1182ohagi_1182
提出日時 2018-04-30 11:12:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 72,536 KB
実行使用メモリ 58,160 KB
最終ジャッジ日時 2023-09-10 08:20:07
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
56,288 KB
testcase_01 AC 121 ms
55,780 KB
testcase_02 AC 120 ms
55,988 KB
testcase_03 AC 121 ms
56,120 KB
testcase_04 AC 123 ms
55,748 KB
testcase_05 AC 123 ms
56,212 KB
testcase_06 AC 126 ms
56,076 KB
testcase_07 AC 125 ms
56,280 KB
testcase_08 AC 125 ms
55,936 KB
testcase_09 AC 126 ms
55,764 KB
testcase_10 AC 128 ms
56,076 KB
testcase_11 AC 134 ms
56,328 KB
testcase_12 AC 133 ms
56,272 KB
testcase_13 AC 132 ms
55,924 KB
testcase_14 AC 135 ms
54,216 KB
testcase_15 AC 143 ms
57,908 KB
testcase_16 AC 140 ms
55,960 KB
testcase_17 AC 145 ms
58,160 KB
testcase_18 AC 146 ms
56,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.TreeSet;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		TreeSet<Long> set = new TreeSet<>();
		for(long i = 0 ; i <= n ; i++) {
			for(long j = 0 ; j <= n ; j++) {
				long x = 1;
				for(long k = 0 ; k < i ; k++) x *= 2;
				for(long k = 0 ; k < j ; k++) x *= 5;
				set.add(x);
			}
		}
		for(long e : set) {
			System.out.println(e);
		}
	}
}
0