結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー risujirohrisujiroh
提出日時 2021-07-21 22:20:21
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 534 bytes
コンパイル時間 2,025 ms
コンパイル使用メモリ 194,664 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-14 05:21:11
合計ジャッジ時間 15,435 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 521 ms
6,940 KB
testcase_02 AC 516 ms
6,944 KB
testcase_03 AC 518 ms
6,940 KB
testcase_04 AC 522 ms
6,944 KB
testcase_05 AC 515 ms
6,940 KB
testcase_06 AC 519 ms
6,944 KB
testcase_07 AC 521 ms
6,944 KB
testcase_08 AC 519 ms
6,944 KB
testcase_09 AC 517 ms
6,944 KB
testcase_10 AC 144 ms
6,940 KB
testcase_11 AC 148 ms
6,940 KB
testcase_12 AC 149 ms
6,940 KB
testcase_13 AC 147 ms
6,944 KB
testcase_14 AC 147 ms
6,944 KB
testcase_15 AC 148 ms
6,944 KB
testcase_16 AC 147 ms
6,940 KB
testcase_17 AC 148 ms
6,940 KB
testcase_18 AC 148 ms
6,944 KB
testcase_19 AC 3 ms
6,944 KB
testcase_20 AC 4 ms
6,940 KB
testcase_21 AC 4 ms
6,944 KB
testcase_22 AC 4 ms
6,940 KB
testcase_23 AC 3 ms
6,944 KB
testcase_24 AC 3 ms
6,944 KB
testcase_25 AC 3 ms
6,940 KB
testcase_26 AC 3 ms
6,940 KB
testcase_27 AC 3 ms
6,940 KB
testcase_28 AC 2 ms
6,944 KB
testcase_29 AC 2 ms
6,940 KB
testcase_30 AC 2 ms
6,944 KB
testcase_31 AC 2 ms
6,940 KB
testcase_32 AC 2 ms
6,944 KB
testcase_33 AC 2 ms
6,940 KB
testcase_34 AC 2 ms
6,944 KB
testcase_35 AC 2 ms
6,940 KB
testcase_36 AC 2 ms
6,940 KB
testcase_37 AC 2 ms
6,940 KB
testcase_38 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
  using namespace std;
  cin.tie(nullptr)->sync_with_stdio(false);
  auto f = [](int64_t x) -> int {
    int res = 1;
    for (int p : {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31}) {
      int e = 0;
      for (; x % p == 0; x /= p) ++e;
      res *= e + 1;
    }
    return res;
  };
  int tt;
  cin >> tt;
  while (tt--) {
    int64_t x;
    cin >> x;
    for (int64_t y = x;; y += x)
      if (f(y) == 2 * f(x)) {
        cout << y << '\n';
        break;
      }
  }
}
0