結果

問題 No.677 10^Nの約数
ユーザー chocopuuchocopuu
提出日時 2019-01-21 20:57:47
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 427 bytes
コンパイル時間 1,627 ms
コンパイル使用メモリ 170,164 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2023-10-13 17:20:16
合計ジャッジ時間 7,311 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,704 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 3 ms
4,348 KB
testcase_11 AC 5 ms
4,348 KB
testcase_12 AC 13 ms
4,352 KB
testcase_13 AC 36 ms
4,348 KB
testcase_14 AC 111 ms
4,348 KB
testcase_15 AC 345 ms
4,348 KB
testcase_16 AC 1,088 ms
4,348 KB
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long


int main() {
    ll N;
    cin >> N;
    vector<ll> res;
    if(N % 2 == 0)res.push_back(pow(10,N/2));
    N = pow(10,N);
    for (ll i = 1; i * i < N; ++i){
        if(N % i != 0)continue;
        res.push_back(i);
        res.push_back(N / i);
    }
    sort(res.begin(),res.end());
    for (auto e : res){
        cout << e << "\n";
    }
    return 0;
}
0