結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー たたき@競プロたたき@競プロ
提出日時 2023-08-31 08:29:25
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 827 bytes
コンパイル時間 6,463 ms
コンパイル使用メモリ 308,692 KB
実行使用メモリ 7,744 KB
最終ジャッジ日時 2023-08-31 08:29:38
合計ジャッジ時間 12,773 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 202 ms
7,684 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 13 ms
7,488 KB
testcase_29 AC 12 ms
7,676 KB
testcase_30 AC 12 ms
7,372 KB
testcase_31 AC 12 ms
7,564 KB
testcase_32 AC 13 ms
7,356 KB
testcase_33 AC 12 ms
7,604 KB
testcase_34 AC 13 ms
7,632 KB
testcase_35 WA -
testcase_36 AC 12 ms
7,588 KB
testcase_37 AC 12 ms
7,620 KB
testcase_38 AC 12 ms
7,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using mint=modint998244353; //1000000007;
using ll=long long;
using pp=pair<int,int>;
#define sr string 
#define vc vector
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define pque priority_queue
#define bpc(a) __builtin_popcount(a)
int main(){
  int m=1e6;
  vc<int>bo(m,1);
  vc<int>ps;
  for(int i=2;i<m;i++)if(bo[i]){
    ps.pb(i); 
    for(int j=i*2;j<m;j+=i)bo[j]=0;
  }
  m=ps[100];
  vc<int>px;
  rep(i,100){
  	int now=ps[i];
    while(now<m)px.pb(now),now*=ps[i];
  }
  sort(all(px));
  int t;cin>>t;
  //cout<<a<<' '<<b<<"\n";
  rep(i,t){
    ll x;cin>>x;
    for(auto au:px)if(x%au!=0){
      cout<<x*au<<"\n";
      break;
    }
  }
}
0