結果

問題 No.531 エヌスクミ島の平和協定
ユーザー キョウチクキョウチク
提出日時 2022-05-16 18:45:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 356 bytes
コンパイル時間 3,768 ms
コンパイル使用メモリ 72,352 KB
実行使用メモリ 56,328 KB
最終ジャッジ日時 2023-10-12 12:34:15
合計ジャッジ時間 10,865 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,920 KB
testcase_01 AC 119 ms
55,592 KB
testcase_02 AC 120 ms
55,920 KB
testcase_03 AC 120 ms
55,828 KB
testcase_04 AC 119 ms
56,224 KB
testcase_05 AC 118 ms
55,836 KB
testcase_06 AC 119 ms
55,776 KB
testcase_07 AC 122 ms
55,752 KB
testcase_08 AC 119 ms
56,328 KB
testcase_09 AC 122 ms
55,908 KB
testcase_10 AC 117 ms
55,556 KB
testcase_11 AC 117 ms
56,300 KB
testcase_12 AC 119 ms
55,744 KB
testcase_13 AC 119 ms
55,800 KB
testcase_14 AC 122 ms
55,900 KB
testcase_15 AC 118 ms
56,148 KB
testcase_16 AC 119 ms
55,940 KB
testcase_17 AC 122 ms
56,316 KB
testcase_18 AC 121 ms
56,020 KB
testcase_19 AC 120 ms
55,756 KB
testcase_20 AC 123 ms
55,716 KB
testcase_21 AC 123 ms
56,016 KB
testcase_22 AC 121 ms
56,204 KB
testcase_23 AC 120 ms
55,892 KB
testcase_24 AC 120 ms
55,744 KB
testcase_25 AC 120 ms
56,052 KB
testcase_26 AC 121 ms
55,840 KB
testcase_27 AC 123 ms
56,180 KB
testcase_28 AC 118 ms
55,596 KB
testcase_29 AC 118 ms
55,572 KB
testcase_30 AC 122 ms
55,932 KB
testcase_31 AC 119 ms
55,792 KB
testcase_32 AC 117 ms
55,840 KB
testcase_33 AC 117 ms
55,760 KB
testcase_34 AC 119 ms
56,092 KB
testcase_35 AC 118 ms
55,612 KB
testcase_36 AC 118 ms
56,144 KB
testcase_37 AC 118 ms
55,840 KB
testcase_38 AC 118 ms
55,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test10 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String[] line;
    line=sc.nextLine().split(" ");
    int n=Integer.parseInt(line[0]),m=Integer.parseInt(line[1]);
    int d=-1;
    if(n<=m) d=1;
    else if(n%2==0&&n<=m*2) d=2;
    System.out.println(d);
    sc.close();
  }
}
0