結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-03 21:54:35 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 706 bytes |
| コンパイル時間 | 863 ms |
| コンパイル使用メモリ | 90,920 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 09:12:46 |
| 合計ジャッジ時間 | 1,571 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define MOD 1000000007
int main() {
int n;
cin >> n;
vector<ll> two, five;
two.push_back(1), five.push_back(1);
ll u = 1, v = 1;
for (int i = 1; i <= n; ++i) {
u *= 2, v *= 5;
two.push_back(u), five.push_back(v);
}
set<ll> st;
for (int i = 0; i < two.size(); ++i) {
for (int j = 0; j < five.size(); ++j) {
st.insert(two[i] * five[j]);
}
}
for (auto ans : st) {
cout << ans << endl;
}
return 0;
}