結果
問題 |
No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
|
ユーザー |
![]() |
提出日時 | 2018-02-15 12:48:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 559 ms |
コンパイル使用メモリ | 60,880 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-25 23:45:08 |
合計ジャッジ時間 | 1,323 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 WA * 1 |
ソースコード
#include<iostream> #include<string> #include<cmath> #include<set> using namespace std; int main(){ long long N,K; cin >> N >> K; if(K==0||N<=K) cout << 0 << endl; else if(N/2+1==K) cout << N-1 << endl; else cout << N-2 << endl; return 0; }