結果
| 問題 | No.677 10^Nの約数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-23 10:30:24 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 624 bytes |
| 記録 | |
| コンパイル時間 | 1,337 ms |
| コンパイル使用メモリ | 165,596 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-06-28 16:07:11 |
| 合計ジャッジ時間 | 6,583 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 TLE * 1 -- * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
ll f(int n) {
ll ans = 1;
for(int i = 1; i <= n; i++)
ans *= 10;
return ans;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
vector<ll> v;
n = f(n);
for (ll i = 1; i*i <= n; i++) {
if (n % i == 0) {
v.push_back(i);
if (i*i != n)
v.push_back(n/i);
}
}
sort(v.begin(), v.end());
for(int i = 0; i < v.size(); i++)
cout << v[i] << endl;
return 0;
}