結果
| 問題 |
No.3253 Banned Product
|
| コンテスト | |
| ユーザー |
tau1235
|
| 提出日時 | 2025-09-05 21:35:25 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 398 bytes |
| コンパイル時間 | 3,512 ms |
| コンパイル使用メモリ | 275,640 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-05 21:35:38 |
| 合計ジャッジ時間 | 6,726 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 TLE * 1 -- * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
void solve(){
using ll=long long;
ll n,k;
cin>>n>>k;
auto check=[&](ll x){
for (ll i=1;i*i<=x&&i<=k;i++){
if (x%i==0&&x/i<=k) return false;
}
return true;
};
for (ll x=n;x>=1;x--){
if (check(x)){
cout<<x<<endl;
return;
}
}
cout<<-1<<endl;
}
int main(){
int t;
cin>>t;
while (t--) solve();
}
tau1235