結果

問題 No.531 エヌスクミ島の平和協定
ユーザー shinwisteriashinwisteria
提出日時 2018-03-13 20:10:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 4,596 ms
コンパイル使用メモリ 74,380 KB
実行使用メモリ 57,580 KB
最終ジャッジ日時 2023-10-19 22:36:26
合計ジャッジ時間 10,953 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,136 KB
testcase_01 AC 130 ms
57,116 KB
testcase_02 AC 131 ms
57,536 KB
testcase_03 AC 131 ms
57,580 KB
testcase_04 AC 129 ms
57,396 KB
testcase_05 AC 130 ms
57,128 KB
testcase_06 AC 131 ms
57,132 KB
testcase_07 AC 127 ms
57,108 KB
testcase_08 AC 132 ms
57,364 KB
testcase_09 AC 130 ms
57,116 KB
testcase_10 AC 128 ms
57,120 KB
testcase_11 AC 130 ms
57,136 KB
testcase_12 AC 131 ms
57,148 KB
testcase_13 AC 131 ms
57,148 KB
testcase_14 AC 131 ms
57,124 KB
testcase_15 AC 132 ms
57,044 KB
testcase_16 AC 133 ms
57,060 KB
testcase_17 AC 131 ms
56,932 KB
testcase_18 AC 130 ms
57,392 KB
testcase_19 AC 131 ms
57,428 KB
testcase_20 AC 130 ms
57,084 KB
testcase_21 AC 132 ms
57,484 KB
testcase_22 AC 131 ms
57,128 KB
testcase_23 AC 131 ms
57,084 KB
testcase_24 AC 131 ms
57,116 KB
testcase_25 AC 133 ms
57,396 KB
testcase_26 AC 133 ms
57,392 KB
testcase_27 AC 130 ms
57,076 KB
testcase_28 AC 131 ms
57,092 KB
testcase_29 AC 130 ms
57,284 KB
testcase_30 AC 131 ms
57,164 KB
testcase_31 AC 131 ms
57,288 KB
testcase_32 AC 132 ms
57,484 KB
testcase_33 AC 131 ms
57,144 KB
testcase_34 AC 130 ms
57,096 KB
testcase_35 AC 132 ms
57,136 KB
testcase_36 AC 132 ms
57,124 KB
testcase_37 AC 131 ms
57,112 KB
testcase_38 AC 133 ms
57,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con531 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt() , m = s.nextInt();
		s.close();

		if(n <= m){
			System.out.println(1);
		}else if(n % 2 == 0 && m >= n / 2){
			System.out.println(2);
		}else{
			System.out.println(-1);
		}
	}

}
0