結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2020-07-26 15:13:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 580 bytes |
| コンパイル時間 | 2,253 ms |
| コンパイル使用メモリ | 201,836 KB |
| 最終ジャッジ日時 | 2025-01-12 05:58:42 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 2 RE * 1 MLE * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
vector<vector<int64_t>> D(N + 1);
for (int64_t i = 1; i <= 10; i++) {
if (10 % i == 0) D[1].emplace_back(i);
}
for (int64_t i = 2; i < N + 1; i++) {
for (int64_t a : D[i - 1]) {
for (int64_t b : D[i - 1]) {
D[i].emplace_back(a * b);
}
}
}
std::sort(D[N].begin(), D[N].end());
D[N].erase(std::unique(D[N].begin(), D[N].end()), D[N].end());
for (int64_t d : D[N]) {
cout << d << '\n';
}
return 0;
}
kyo1