結果

問題 No.677 10^Nの約数
ユーザー gotutiyangotutiyan
提出日時 2018-05-20 15:28:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 881 bytes
コンパイル時間 1,839 ms
コンパイル使用メモリ 172,724 KB
実行使用メモリ 813,076 KB
最終ジャッジ日時 2023-09-11 00:02:35
合計ジャッジ時間 4,524 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 MLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,j,k) for(ll i=(ll)j;i<(ll)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF INT_MAX
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};

using namespace std;

int main(){
    int n;
    cin>>n;
    vector<ll> v={1,2,5,10};
    
    rep(i,1,n){
        int sz=v.size();
        rep(j,1,sz){
            rep(k,j,sz){
                v.pb(v[j]*v[k]);
            }
        }
    }
    
    Sort(v);
    v.erase(unique(all(v)),v.end());
    
    rep(i,0,v.size()){
        cout<<v[i]<<endl;
    }
    
    return 0;
}
0