結果

問題 No.677 10^Nの約数
ユーザー naipia
提出日時 2018-05-26 15:02:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
MLE  
実行時間 -
コード長 539 bytes
コンパイル時間 1,550 ms
コンパイル使用メモリ 164,692 KB
実行使用メモリ 817,116 KB
最終ジャッジ日時 2024-06-28 18:10:19
合計ジャッジ時間 6,316 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 MLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    vector<long long> ans;
    const long long v[]={1,2,5,10};
    cin >> N;

    ans.push_back(1);
    for(int i=0;i<N;i++){
        vector<long long> tmp;
        for(int j=0;j<ans.size();j++){
            for(int k=0;k<4;k++) tmp.push_back(ans[j]*v[k]);
        }
        ans=tmp;
    }
    sort(ans.begin(),ans.end());
    long long pre=0;
    for(int i=0;i<ans.size();i++){
        if(ans[i]!=pre) cout << ans[i] << endl;
        pre=ans[i];
    }

    return 0;
}
0