結果

問題 No.677 10^Nの約数
ユーザー 👑 naipianaipia
提出日時 2018-05-26 15:02:28
言語 C++11
(gcc 11.4.0)
結果
MLE  
実行時間 -
コード長 539 bytes
コンパイル時間 3,131 ms
コンパイル使用メモリ 150,980 KB
実行使用メモリ 814,368 KB
最終ジャッジ日時 2023-09-11 03:36:54
合計ジャッジ時間 7,479 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 3 ms
4,384 KB
testcase_08 AC 5 ms
4,432 KB
testcase_09 AC 19 ms
7,812 KB
testcase_10 AC 67 ms
21,784 KB
testcase_11 AC 262 ms
76,828 KB
testcase_12 AC 1,140 ms
298,220 KB
testcase_13 MLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

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