結果

問題 No.677 10^Nの約数
ユーザー kyo1kyo1
提出日時 2020-07-26 15:13:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 580 bytes
コンパイル時間 2,204 ms
コンパイル使用メモリ 206,648 KB
実行使用メモリ 814,912 KB
最終ジャッジ日時 2023-09-11 01:46:41
合計ジャッジ時間 5,372 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<vector<int64_t>> D(N + 1);
  for (int64_t i = 1; i <= 10; i++) {
    if (10 % i == 0) D[1].emplace_back(i);
  }
  for (int64_t i = 2; i < N + 1; i++) {
    for (int64_t a : D[i - 1]) {
      for (int64_t b : D[i - 1]) {
        D[i].emplace_back(a * b);
      }
    }
  }
  std::sort(D[N].begin(), D[N].end());
  D[N].erase(std::unique(D[N].begin(), D[N].end()), D[N].end());
  for (int64_t d : D[N]) {
    cout << d << '\n';
  }
  return 0;
}
0