結果

問題 No.531 エヌスクミ島の平和協定
ユーザー 37zigen37zigen
提出日時 2017-06-24 05:09:56
言語 Java19
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 727 bytes
コンパイル時間 2,083 ms
コンパイル使用メモリ 74,820 KB
実行使用メモリ 57,636 KB
最終ジャッジ日時 2023-10-19 20:18:25
合計ジャッジ時間 8,532 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,488 KB
testcase_01 AC 131 ms
57,408 KB
testcase_02 AC 131 ms
57,292 KB
testcase_03 AC 131 ms
57,316 KB
testcase_04 AC 132 ms
57,396 KB
testcase_05 AC 132 ms
57,384 KB
testcase_06 AC 134 ms
57,268 KB
testcase_07 AC 129 ms
56,996 KB
testcase_08 AC 132 ms
57,384 KB
testcase_09 AC 131 ms
57,552 KB
testcase_10 AC 131 ms
57,340 KB
testcase_11 AC 131 ms
57,480 KB
testcase_12 AC 135 ms
57,472 KB
testcase_13 AC 133 ms
57,432 KB
testcase_14 AC 134 ms
55,524 KB
testcase_15 AC 134 ms
57,396 KB
testcase_16 AC 135 ms
55,472 KB
testcase_17 AC 134 ms
57,396 KB
testcase_18 AC 135 ms
57,476 KB
testcase_19 AC 134 ms
57,420 KB
testcase_20 AC 135 ms
57,528 KB
testcase_21 AC 134 ms
57,124 KB
testcase_22 AC 133 ms
57,424 KB
testcase_23 AC 135 ms
57,480 KB
testcase_24 AC 134 ms
57,500 KB
testcase_25 AC 133 ms
57,388 KB
testcase_26 AC 131 ms
57,404 KB
testcase_27 AC 134 ms
57,224 KB
testcase_28 AC 134 ms
57,560 KB
testcase_29 AC 134 ms
57,408 KB
testcase_30 AC 134 ms
57,400 KB
testcase_31 AC 132 ms
57,452 KB
testcase_32 AC 130 ms
57,068 KB
testcase_33 AC 131 ms
57,636 KB
testcase_34 AC 131 ms
57,424 KB
testcase_35 AC 130 ms
57,392 KB
testcase_36 AC 131 ms
57,436 KB
testcase_37 AC 130 ms
57,352 KB
testcase_38 AC 135 ms
57,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		long t = System.currentTimeMillis();
		new Main().run();
		// new Thread(null, new Main(), "",
		// Runtime.getRuntime().maxMemory()).start();
		System.err.println(System.currentTimeMillis() - t);
	}

	@SuppressWarnings("unchecked")
	public void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		if (n <= m) {
			System.out.println(1);
		} else if (n % 2 == 0 && n / 2 <= m) {
			System.out.println(2);
		} else {
			System.out.println(-1);
		}
	}

	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}
0