結果

問題 No.1611 Minimum Multiple with Double Divisors
ユーザー たたき@競プロたたき@競プロ
提出日時 2023-08-31 08:40:30
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 824 bytes
コンパイル時間 5,996 ms
コンパイル使用メモリ 309,216 KB
実行使用メモリ 11,980 KB
最終ジャッジ日時 2023-08-31 08:40:43
合計ジャッジ時間 11,916 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 209 ms
11,812 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 17 ms
11,808 KB
testcase_29 AC 17 ms
11,816 KB
testcase_30 AC 17 ms
11,792 KB
testcase_31 AC 18 ms
11,880 KB
testcase_32 AC 17 ms
11,912 KB
testcase_33 AC 17 ms
11,828 KB
testcase_34 AC 19 ms
11,852 KB
testcase_35 WA -
testcase_36 AC 18 ms
11,916 KB
testcase_37 AC 18 ms
11,792 KB
testcase_38 AC 18 ms
11,660 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(){
  ll m=1e6;
  vc<ll>bo(m,1);
  vc<ll>ps;
  for(ll i=2;i<m;i++)if(bo[i]){
    ps.pb(i); 
    for(ll j=i*2;j<m;j+=i)bo[j]=0;
  }
  m=ps[20];
  vc<ll>px;
  rep(i,20){
  	ll now=ps[i];
    while(now<m){px.pb(now); now*=ps[i];}
  }
  sort(all(px));
  ll t;cin>>t;
  //rep(i,20)cout<<px[i]<<' ';
  rep(i,t){
    ll x;cin>>x;
    for(auto au:px)if(x%au!=0){
      cout<<x*au<<"\n";
      break;
    }
  }
}
0