結果
問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
ユーザー |
👑 ![]() |
提出日時 | 2020-09-26 15:09:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 228 bytes |
コンパイル時間 | 1,492 ms |
コンパイル使用メモリ | 165,980 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-29 02:31:25 |
合計ジャッジ時間 | 2,611 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 7 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int N, K; cin >> N >> K; int x = 0; if (K<1 && K>N) x = N; else if (N == K * 2 - 1) x = 1; else x = 2; cout << (N - x) << endl; return 0; }