結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  htensai | 
| 提出日時 | 2019-11-12 08:23:40 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 139 ms / 2,000 ms | 
| コード長 | 495 bytes | 
| コンパイル時間 | 2,247 ms | 
| コンパイル使用メモリ | 79,040 KB | 
| 実行使用メモリ | 54,432 KB | 
| 最終ジャッジ日時 | 2024-09-17 10:59:33 | 
| 合計ジャッジ時間 | 5,645 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
import java.util.*;
public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		PriorityQueue<Long> queue = new PriorityQueue<>();
		for (int i = 0; i <= n; i++) {
		    for (int j = 0; j <= n; j++) {
		        queue.add((long)(Math.pow(2, i) * Math.pow(5, j)));
		    }
		}
		StringBuilder sb = new StringBuilder();
		while (queue.size() > 0) {
		    sb.append(queue.poll()).append("\n");
		}
		System.out.print(sb);
   }
}
            
            
            
        