結果
問題 |
No.3253 Banned Product
|
ユーザー |
![]() |
提出日時 | 2025-08-24 03:02:15 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 3,463 ms |
コンパイル使用メモリ | 275,436 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-05 05:29:04 |
合計ジャッジ時間 | 4,090 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N, K; cin >> N >> K; auto is_good = [&](int x) -> bool { for (int d = 1; d * d <= x; d++) { if (x%d) continue; if (d <= K and x / d <= K) return false; } return true; }; for (int x = N; x >= max(1, N - 281); x--) { if (is_good(x)) { cout << x << endl; return 0; } } cout << -1 << endl; }