結果
| 問題 | No.677 10^Nの約数 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-07-12 17:29:47 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 4 ms / 2,000 ms | 
| コード長 | 756 bytes | 
| コンパイル時間 | 1,255 ms | 
| コンパイル使用メモリ | 112,992 KB | 
| 最終ジャッジ日時 | 2025-01-11 20:03:31 | 
| ジャッジサーバーID (参考情報) | judge3 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 17 | 
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
using namespace std;
typedef long long int ll;
using ull = unsigned long long;
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<ll> v,vv;
    vector<ll> res;
    ll p=1,pp=1;
    for(int i=0;i<=n;i++){
        v.push_back(p);
        vv.push_back(pp);
        p*=2;
        pp*=5;
    }
    for(int i=0;i<=n;i++){
        for(int j=0;j<=n;j++){
            res.push_back(v[i]*vv[j]);
        }
    }
    sort(res.begin(), res.end());
    for(ll d:res){
        printf("%lld\n",d);
    }
}
            
            
            
        