結果
| 問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
| コンテスト | |
| ユーザー |
fal_rnd
|
| 提出日時 | 2017-08-25 23:32:30 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 56 ms / 2,000 ms |
| + 602µs | |
| コード長 | 507 bytes |
| 記録 | |
| コンパイル時間 | 1,574 ms |
| コンパイル使用メモリ | 88,852 KB |
| 実行使用メモリ | 45,424 KB |
| 最終ジャッジ日時 | 2026-09-18 16:16:32 |
| 合計ジャッジ時間 | 4,776 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
ソースコード
import java.util.Scanner;
import java.util.stream.IntStream;
public class Main{
static IntStream REPS(int v){return IntStream.range(0,v);}
static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
static IntStream INS(int n) {return REPS(n).map(i->getInt());}
static Scanner s=new Scanner(System.in);
static int getInt(){return Integer.parseInt(s.next());}
public static void main(String[]$){
int n=getInt(),d=getInt();
System.out.println(d==0||d>n?0:n%2==1&&n/2+1==d?n-1:n-2);
}
}
fal_rnd