結果
| 問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-29 09:11:54 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 148 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 28,160 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 23:43:23 |
| 合計ジャッジ時間 | 1,184 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 6 |
ソースコード
#include <stdio.h>
int main(void)
{
int n,k,i;
scanf("%d%d",&n,&k);
if(k==0||k>n)n=0;
else (n+1)/2==k?n--:(n-=2);
printf("%d",n);
return 0;
}