結果

問題 No.677 10^Nの約数
ユーザー oooooba
提出日時 2021-03-23 21:45:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 697 bytes
コンパイル時間 1,540 ms
コンパイル使用メモリ 117,320 KB
最終ジャッジ日時 2025-01-19 21:19:23
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int32_t n;
    cin >> n;
    vector<int64_t> ans;
    int64_t t2 = 1;
    for (auto i2 = 0; i2 <= n; ++i2) {
        int64_t t5 = t2;
        for (auto i5 = 0; i5 <= n; ++i5) {
            ans.push_back(t5);
            t5 *= 5;
        }
        t2 *= 2;
    }
    sort(ans.begin(), ans.end());
    for (auto a : ans) {
        cout << a << endl;
    }
    return 0;
}
0