結果
問題 |
No.677 10^Nの約数
|
ユーザー |
|
提出日時 | 2018-05-26 15:21:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 1,341 ms |
コンパイル使用メモリ | 164,604 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 18:10:22 |
合計ジャッジ時間 | 2,030 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 |
ソースコード
#include<bits/stdc++.h> using namespace std; long long solver(int radix, int index){ long long ans=1; for(int i=0;i<index;i++) ans=(long long)ans*radix; return ans; } int main(){ int N; vector<long long> ans; cin >> N; for(int i=0;i<N+1;i++){ for(int j=0;j<N+1;j++){ ans.push_back(solver(2,i)*solver(5,j)); } } sort(ans.begin(),ans.end()); for(int i=0;i<ans.size();i++) cout << ans[i] << endl; return 0; }