結果

問題 No.677 10^Nの約数
ユーザー tokutarotokutaro
提出日時 2020-03-22 09:54:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 505 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 75,496 KB
実行使用メモリ 8,692 KB
最終ジャッジ日時 2023-08-26 03:23:57
合計ジャッジ時間 6,522 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
typedef long long ll;
using namespace std;

int main() {
    int N;
    cin >> N;
    ll l = 1;
    for (int i = 0; i < N; i++) {
        l *= 10;
    }
    vector<ll> vc;
    for (ll i = 1; i * i <= l; i++) {
        if (l % i == 0) {
            vc.push_back(i);
            if (i * i != l) vc.push_back(l / i);
        }
    }
    sort(vc.begin(), vc.end());
    for (int i = 0; i < vc.size(); i++) cout << vc.at(i) << endl;   
    return 0;
}
0