結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  m1025o1184t | 
| 提出日時 | 2019-12-10 02:08:09 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 556 bytes | 
| コンパイル時間 | 1,606 ms | 
| コンパイル使用メモリ | 173,396 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-06-23 12:53:38 | 
| 合計ジャッジ時間 | 2,345 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	vector<ll> ans;
	rep(i, n + 1) {
		ll k = pow(2, i);
		ans.push_back(k);
	}
	rep(i, n + 1) {
		rep(j, n + 1) {
			ll k = ans[i] * pow(5, j);
			ans.push_back(k);
		}
	}
	sort(all(ans));
	auto result = unique(all(ans));
	ans.erase(result, ans.end());
	int l = (n + 1) * (n + 1);
	rep(i, l) {
		cout << ans[i] << endl;
	}
	return 0;
}
            
            
            
        