結果
| 問題 |
No.1611 Minimum Multiple with Double Divisors
|
| コンテスト | |
| ユーザー |
たたき@競プロ
|
| 提出日時 | 2023-08-31 07:44:45 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 813 bytes |
| コンパイル時間 | 6,918 ms |
| コンパイル使用メモリ | 332,584 KB |
| 実行使用メモリ | 7,808 KB |
| 最終ジャッジ日時 | 2025-01-03 04:27:31 |
| 合計ジャッジ時間 | 11,827 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 28 |
ソースコード
#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[20];
vc<int>px;
rep(i,20){
while(ps[i]<m)px.pb(ps[i]),ps[i]*=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;
}
}
}
たたき@競プロ