結果
問題 |
No.677 10^Nの約数
|
ユーザー |
|
提出日時 | 2020-02-13 13:49:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 1,512 ms |
コンパイル使用メモリ | 173,748 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-05 19:09:37 |
合計ジャッジ時間 | 2,399 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) #define all(a) begin(a),end(a) ll powll(ll b, ll x) { if (x == 0) return 1; if (x == 1) return b; if (x & 1) return powll(b*b, x/2) * b; return powll(b*b, x/2); } int main() { int N; cin >>N; vector<ll> d; rep(i, N+1) rep(j, N+1) d.push_back(powll(2,i)*powll(5,j)); sort(all(d)); rep(i, d.size()) cout << d[i] << endl; }