結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  youthfuldays072 | 
| 提出日時 | 2018-05-25 09:59:57 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 150 ms / 2,000 ms | 
| コード長 | 694 bytes | 
| コンパイル時間 | 2,280 ms | 
| コンパイル使用メモリ | 75,716 KB | 
| 実行使用メモリ | 41,976 KB | 
| 最終ジャッジ日時 | 2024-06-28 17:52:43 | 
| 合計ジャッジ時間 | 5,463 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
    	Main main=new Main();
    	main.run();
    }
    void run() {
    	Scanner sc=new Scanner(System.in);
    	int n=sc.nextInt();
    	List<Long> ans=new ArrayList<Long>();
    	for(int i2=0;i2<n+1;i2++) {
    		for(int i5=0;i5<n+1;i5++) {
    			long x=1;
    			for(int i=0;i<i2;i++) {
    				x*=2;
    			}
    			for(int i=0;i<i5;i++) {
    				x*=5;
    			}
    			ans.add(x);
    		}
    	}
    	Collections.sort(ans);
    	for(Long i:ans) {
    		System.out.println(i);
    	}
    }
}
            
            
            
        