結果

問題 No.677 10^Nの約数
ユーザー uafr_csuafr_cs
提出日時 2018-04-27 22:29:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 2,378 ms
コンパイル使用メモリ 76,192 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-09-10 06:24:58
合計ジャッジ時間 6,151 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,448 KB
testcase_01 AC 125 ms
55,556 KB
testcase_02 AC 127 ms
56,052 KB
testcase_03 AC 125 ms
55,692 KB
testcase_04 AC 127 ms
55,932 KB
testcase_05 AC 129 ms
55,840 KB
testcase_06 AC 132 ms
56,096 KB
testcase_07 AC 133 ms
55,704 KB
testcase_08 AC 134 ms
55,440 KB
testcase_09 AC 135 ms
55,516 KB
testcase_10 AC 135 ms
56,128 KB
testcase_11 AC 142 ms
55,904 KB
testcase_12 AC 141 ms
55,688 KB
testcase_13 AC 143 ms
55,484 KB
testcase_14 AC 145 ms
55,748 KB
testcase_15 AC 153 ms
56,080 KB
testcase_16 AC 155 ms
56,032 KB
testcase_17 AC 154 ms
56,304 KB
testcase_18 AC 154 ms
55,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		
		TreeSet<Long> set = new TreeSet<Long>();
		
		for(long i = 0, two = 1; i <= N; i++, two *= 2) {
			for(long j = 0, five = 1; j <= N; j++, five *= 5) {
				set.add(two * five);
			}
		}
		
		for(final long x : set) {
			System.out.println(Long.toUnsignedString(x));
		}
	}
}
0