結果

問題 No.677 10^Nの約数
ユーザー kikage
提出日時 2020-04-02 03:20:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 850 ms
コンパイル使用メモリ 69,036 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 15:26:01
合計ジャッジ時間 1,599 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

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