結果
| 問題 | No.1611 Minimum Multiple with Double Divisors |
| コンテスト | |
| ユーザー |
たたき@競プロ
|
| 提出日時 | 2023-08-31 07:37:13 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 744 bytes |
| 記録 | |
| コンパイル時間 | 6,546 ms |
| コンパイル使用メモリ | 332,348 KB |
| 実行使用メモリ | 7,808 KB |
| 最終ジャッジ日時 | 2025-01-03 04:26:55 |
| 合計ジャッジ時間 | 15,539 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 37 |
ソースコード
#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;
}
int a=ps.back(); ps.pop_back();
int b=ps.back();
int t;cin>>t;
//cout<<a<<' '<<b<<"\n";
rep(i,t){
ll x;cin>>x;
if(x%a==0)cout<<x*b<<"\n";
else cout<<x*a<<"\n";
}
}
たたき@競プロ