結果

問題 No.531 エヌスクミ島の平和協定
ユーザー 37zigen37zigen
提出日時 2017-06-24 05:07:35
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 757 bytes
コンパイル時間 2,350 ms
コンパイル使用メモリ 76,028 KB
実行使用メモリ 41,908 KB
最終ジャッジ日時 2024-04-15 14:30:55
合計ジャッジ時間 8,826 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
41,332 KB
testcase_01 AC 137 ms
41,124 KB
testcase_02 AC 136 ms
41,628 KB
testcase_03 AC 138 ms
41,084 KB
testcase_04 AC 138 ms
41,212 KB
testcase_05 AC 138 ms
41,592 KB
testcase_06 AC 137 ms
41,328 KB
testcase_07 WA -
testcase_08 AC 143 ms
41,556 KB
testcase_09 AC 140 ms
41,560 KB
testcase_10 AC 141 ms
41,056 KB
testcase_11 AC 137 ms
41,484 KB
testcase_12 AC 138 ms
41,180 KB
testcase_13 AC 136 ms
41,312 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 136 ms
41,292 KB
testcase_17 WA -
testcase_18 AC 138 ms
41,428 KB
testcase_19 WA -
testcase_20 AC 138 ms
41,452 KB
testcase_21 WA -
testcase_22 AC 139 ms
41,156 KB
testcase_23 WA -
testcase_24 AC 139 ms
41,312 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 142 ms
41,356 KB
testcase_28 WA -
testcase_29 AC 142 ms
41,452 KB
testcase_30 AC 139 ms
41,400 KB
testcase_31 AC 139 ms
41,908 KB
testcase_32 AC 140 ms
41,256 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 138 ms
41,516 KB
testcase_36 WA -
testcase_37 AC 137 ms
41,568 KB
testcase_38 AC 140 ms
41,128 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 - 1) / m == 1) {
			System.out.println(2);
		} else if (n % 2 == 1) {
			System.out.println(-1);
		}
	}

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