結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー bokusunny
提出日時 2022-02-12 22:06:40
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 541 bytes
コンパイル時間 2,152 ms
コンパイル使用メモリ 192,976 KB
最終ジャッジ日時 2025-01-27 22:49:04
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define bokusunny ios::sync_with_stdio(false), cin.tie(nullptr);

bool is_prime(long long x) {
  if (x == 1) return false;

  long long i = 2;
  while (i * i <= x) {
    if (x % i == 0) return false;
    i++;
  }
  return true;
}

void solve() {
  int T;
  cin >> T;
  while (T--) {
    long long x;
    cin >> x;

    for (int p = 2; p <= 100; p++) {
      if (x % p != 0) {
        cout << x * p << endl;
        break;
      }
    }
  }
}

int main() {
  bokusunny;
  solve();

  return 0;
}
0