結果

問題 No.677 10^Nの約数
ユーザー ninoinuininoinui
提出日時 2020-01-26 02:31:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 407 bytes
コンパイル時間 1,649 ms
コンパイル使用メモリ 171,624 KB
実行使用メモリ 8,744 KB
最終ジャッジ日時 2023-10-12 04:52:17
合計ジャッジ時間 7,887 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

vector<long> div(long n) {
  vector<long> v;
  for (long 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());
  return v;
}

int main() {
  int N;
  cin >> N;
  vector<long> V;
  V = div(pow(10, N));
  for (int i = 0; i < V.size(); i++) cout << V.at(i) << "\n";
}
0