結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  ui_mtc | 
| 提出日時 | 2020-10-10 19:31:31 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 668 bytes | 
| コンパイル時間 | 1,544 ms | 
| コンパイル使用メモリ | 174,796 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-20 16:52:17 | 
| 合計ジャッジ時間 | 2,279 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
#include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int MOD =  1000000007;
const int INF = 1e11;
using Graph = vector<vector<int>>;
signed main(){
  int N;
  cin >> N;
  if( N == 0 ){
    cout << 1 << endl;
    return 0;
  }
  set<int> num;
  num.insert(1);
  num.insert(2);
  num.insert(5);
  num.insert(10);
  for( int i = 2; i <= N; i++ ){
    vector<int> now;
    for( auto p : num ) now.emplace_back(p*2);
    for( auto p : num ) now.emplace_back(p*5);
    for( auto p : num ) now.emplace_back(p*10);
    for( int j = 0; j < now.size(); j++ ) num.insert(now[j]);
  }
  for( auto p : num ) cout << p << endl;
}
            
            
            
        