結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
kagasan
|
| 提出日時 | 2019-08-22 21:54:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 580 bytes |
| コンパイル時間 | 1,698 ms |
| コンパイル使用メモリ | 174,332 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 23:20:43 |
| 合計ジャッジ時間 | 2,663 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
void Say(bool say, string a = "Yes", string b = "No"){cout << (say ? a : b) << endl;};
int main(){
ll N;
cin >> N;
set<ll>S[20];
S[0].insert(1);
vector<ll>v = {1, 2, 5, 10};
for(ll i = 0; i < N; i++){
for(auto it = S[i].begin(); it != S[i].end(); it++){
for(ll j = 0; j < 4; j++){
S[i + 1].insert((*it) * v[j]);
}
}
}
for(auto it = S[N].begin(); it != S[N].end(); it++){
cout << *it << endl;
}
return 0;
}
kagasan