結果

問題 No.677 10^Nの約数
ユーザー uafr_cs
提出日時 2018-04-27 22:25:05
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 500 bytes
コンパイル時間 2,303 ms
コンパイル使用メモリ 75,192 KB
実行使用メモリ 41,484 KB
最終ジャッジ日時 2024-06-27 21:51:52
合計ジャッジ時間 5,450 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

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(int j = 0, five = 1; j <= N; j++, five *= 5) {
				set.add(two * five);
			}
		}
		
		for(final long x : set) {
			System.out.println(x);
		}
	}
}
0