結果

問題 No.677 10^Nの約数
ユーザー kikagekikage
提出日時 2020-04-02 03:20:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 877 ms
コンパイル使用メモリ 70,868 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-09 22:56:13
合計ジャッジ時間 2,089 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
    int N;
    cin >> N;
    vector<long long> set((N+1)*(N+1));
    for(int a=0;a<=N;a++){
        for(int b=0;b<=N;b++){
            set[a*(N+1)+b]=pow(2,a)*pow(5,b);
        }
    }
    sort(set.begin(),set.end());
    for(int i=0;i<set.size();i++){
        cout << set[i] << endl;
    }
    return 0;
}
0