結果

問題 No.677 10^Nの約数
ユーザー ui_mtc
提出日時 2020-10-10 19:30:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 609 bytes
コンパイル時間 1,912 ms
コンパイル使用メモリ 174,732 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 16:52:15
合計ジャッジ時間 2,459 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;

  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;
}
0