結果

問題 No.531 エヌスクミ島の平和協定
ユーザー YamaKasaYamaKasa
提出日時 2018-06-02 21:26:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 365 bytes
コンパイル時間 2,215 ms
コンパイル使用メモリ 74,000 KB
実行使用メモリ 57,596 KB
最終ジャッジ日時 2023-10-19 22:38:43
合計ジャッジ時間 8,832 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,580 KB
testcase_01 AC 133 ms
57,380 KB
testcase_02 AC 130 ms
57,304 KB
testcase_03 AC 129 ms
57,516 KB
testcase_04 AC 128 ms
57,268 KB
testcase_05 AC 130 ms
57,324 KB
testcase_06 AC 132 ms
57,524 KB
testcase_07 AC 131 ms
57,304 KB
testcase_08 AC 130 ms
57,256 KB
testcase_09 AC 131 ms
57,520 KB
testcase_10 AC 131 ms
57,580 KB
testcase_11 AC 132 ms
55,520 KB
testcase_12 AC 131 ms
57,520 KB
testcase_13 AC 131 ms
57,424 KB
testcase_14 AC 133 ms
57,452 KB
testcase_15 AC 129 ms
57,556 KB
testcase_16 AC 132 ms
57,252 KB
testcase_17 AC 129 ms
57,520 KB
testcase_18 AC 129 ms
57,340 KB
testcase_19 AC 131 ms
57,312 KB
testcase_20 AC 129 ms
57,468 KB
testcase_21 AC 134 ms
57,596 KB
testcase_22 AC 131 ms
57,384 KB
testcase_23 AC 133 ms
57,408 KB
testcase_24 AC 131 ms
56,992 KB
testcase_25 AC 131 ms
57,340 KB
testcase_26 AC 132 ms
57,388 KB
testcase_27 AC 130 ms
57,400 KB
testcase_28 AC 131 ms
57,456 KB
testcase_29 AC 129 ms
57,296 KB
testcase_30 AC 129 ms
57,516 KB
testcase_31 AC 133 ms
57,388 KB
testcase_32 AC 132 ms
57,564 KB
testcase_33 AC 132 ms
57,412 KB
testcase_34 AC 130 ms
57,348 KB
testcase_35 AC 131 ms
57,572 KB
testcase_36 AC 131 ms
57,532 KB
testcase_37 AC 130 ms
57,540 KB
testcase_38 AC 130 ms
57,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

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


	}
}
0