結果

問題 No.531 エヌスクミ島の平和協定
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-28 23:23:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 1,966 ms
コンパイル使用メモリ 72,064 KB
実行使用メモリ 56,648 KB
最終ジャッジ日時 2023-08-24 16:54:37
合計ジャッジ時間 8,447 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,684 KB
testcase_01 AC 118 ms
55,880 KB
testcase_02 AC 120 ms
55,528 KB
testcase_03 AC 120 ms
55,780 KB
testcase_04 AC 122 ms
55,916 KB
testcase_05 AC 120 ms
55,968 KB
testcase_06 AC 119 ms
56,040 KB
testcase_07 WA -
testcase_08 AC 119 ms
55,696 KB
testcase_09 AC 120 ms
56,644 KB
testcase_10 AC 121 ms
55,652 KB
testcase_11 AC 120 ms
55,644 KB
testcase_12 AC 119 ms
55,872 KB
testcase_13 AC 117 ms
55,988 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 117 ms
56,196 KB
testcase_17 WA -
testcase_18 AC 119 ms
55,528 KB
testcase_19 WA -
testcase_20 AC 119 ms
55,536 KB
testcase_21 WA -
testcase_22 AC 123 ms
55,936 KB
testcase_23 WA -
testcase_24 AC 120 ms
55,764 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 118 ms
56,340 KB
testcase_28 WA -
testcase_29 AC 119 ms
55,624 KB
testcase_30 AC 118 ms
56,020 KB
testcase_31 AC 119 ms
55,972 KB
testcase_32 AC 119 ms
55,912 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 118 ms
56,032 KB
testcase_36 WA -
testcase_37 AC 118 ms
55,524 KB
testcase_38 AC 119 ms
55,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import static java.lang.System.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int m = sc.nextInt();
		if (n <= m) {out.println(1);}
		else {
			if (n%2==1) {out.println(-1);}
			else if (n%2==0) {out.println(2);}
		}
	}
}
0