結果

問題 No.531 エヌスクミ島の平和協定
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-23 22:30:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 2,094 ms
コンパイル使用メモリ 77,076 KB
実行使用メモリ 57,644 KB
最終ジャッジ日時 2023-10-19 20:07:19
合計ジャッジ時間 8,372 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,548 KB
testcase_01 AC 130 ms
57,400 KB
testcase_02 AC 131 ms
57,364 KB
testcase_03 AC 133 ms
57,368 KB
testcase_04 AC 133 ms
57,372 KB
testcase_05 AC 133 ms
57,392 KB
testcase_06 AC 131 ms
57,568 KB
testcase_07 AC 131 ms
57,504 KB
testcase_08 AC 134 ms
57,368 KB
testcase_09 AC 132 ms
57,392 KB
testcase_10 AC 131 ms
57,356 KB
testcase_11 AC 129 ms
57,512 KB
testcase_12 AC 130 ms
57,428 KB
testcase_13 AC 129 ms
57,332 KB
testcase_14 AC 132 ms
57,576 KB
testcase_15 AC 132 ms
57,440 KB
testcase_16 AC 134 ms
57,396 KB
testcase_17 AC 132 ms
57,436 KB
testcase_18 AC 133 ms
57,276 KB
testcase_19 AC 130 ms
57,532 KB
testcase_20 AC 129 ms
57,292 KB
testcase_21 AC 131 ms
57,564 KB
testcase_22 AC 130 ms
57,548 KB
testcase_23 AC 132 ms
57,440 KB
testcase_24 AC 130 ms
57,364 KB
testcase_25 AC 131 ms
55,424 KB
testcase_26 AC 130 ms
57,288 KB
testcase_27 AC 129 ms
57,396 KB
testcase_28 AC 130 ms
55,480 KB
testcase_29 AC 130 ms
55,596 KB
testcase_30 AC 128 ms
57,604 KB
testcase_31 AC 130 ms
57,392 KB
testcase_32 AC 129 ms
57,348 KB
testcase_33 AC 128 ms
57,300 KB
testcase_34 AC 129 ms
57,272 KB
testcase_35 AC 128 ms
57,156 KB
testcase_36 AC 130 ms
57,408 KB
testcase_37 AC 129 ms
57,436 KB
testcase_38 AC 130 ms
57,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int ans = -1;
    if(n % 2 == 1) {
      if(m >= n) ans = 1;
    } else {
      if(m >= n) {
        ans = 1;
      } else {
        if(m >= (n / 2)) ans = 2;
      }
    }
    System.out.println(ans);
  }
}
0