結果
| 問題 |
No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
|
| コンテスト | |
| ユーザー |
AOW_MIRROR_O5
|
| 提出日時 | 2018-03-08 17:13:47 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 341 bytes |
| コンパイル時間 | 3,681 ms |
| コンパイル使用メモリ | 73,980 KB |
| 実行使用メモリ | 54,456 KB |
| 最終ジャッジ日時 | 2024-10-05 08:03:02 |
| 合計ジャッジ時間 | 8,040 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 13 |
ソースコード
import java.util.*;
public class paiza7 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int D = sc.nextInt();
int K = sc.nextInt();
if(K==0 || K>D){
System.out.println(0);
}
if(((1+D)/2)==K){
System.out.println(D-1);
}else{
System.out.println(D-2);
}
}
}
AOW_MIRROR_O5