結果

問題 No.531 エヌスクミ島の平和協定
ユーザー tsunabittsunabit
提出日時 2019-06-16 17:46:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 3,451 ms
コンパイル使用メモリ 74,564 KB
実行使用メモリ 41,644 KB
最終ジャッジ日時 2024-05-03 10:30:11
合計ジャッジ時間 9,198 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
41,176 KB
testcase_01 AC 122 ms
41,040 KB
testcase_02 AC 118 ms
41,392 KB
testcase_03 AC 109 ms
41,612 KB
testcase_04 AC 116 ms
41,264 KB
testcase_05 AC 114 ms
41,392 KB
testcase_06 AC 116 ms
41,328 KB
testcase_07 AC 113 ms
41,408 KB
testcase_08 AC 116 ms
41,152 KB
testcase_09 AC 115 ms
41,172 KB
testcase_10 AC 104 ms
41,332 KB
testcase_11 AC 103 ms
41,388 KB
testcase_12 AC 111 ms
41,032 KB
testcase_13 AC 121 ms
41,468 KB
testcase_14 AC 123 ms
40,988 KB
testcase_15 AC 124 ms
41,468 KB
testcase_16 AC 124 ms
41,436 KB
testcase_17 AC 123 ms
41,280 KB
testcase_18 AC 128 ms
41,428 KB
testcase_19 AC 124 ms
41,524 KB
testcase_20 AC 119 ms
41,300 KB
testcase_21 AC 121 ms
41,196 KB
testcase_22 AC 117 ms
41,476 KB
testcase_23 AC 119 ms
41,392 KB
testcase_24 AC 102 ms
41,476 KB
testcase_25 AC 106 ms
41,260 KB
testcase_26 AC 116 ms
41,228 KB
testcase_27 AC 119 ms
41,228 KB
testcase_28 AC 106 ms
41,644 KB
testcase_29 AC 103 ms
41,036 KB
testcase_30 AC 121 ms
40,956 KB
testcase_31 AC 114 ms
41,116 KB
testcase_32 AC 104 ms
40,016 KB
testcase_33 AC 117 ms
41,268 KB
testcase_34 AC 121 ms
41,140 KB
testcase_35 AC 117 ms
41,392 KB
testcase_36 AC 103 ms
41,100 KB
testcase_37 AC 121 ms
41,548 KB
testcase_38 AC 116 ms
41,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No526 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt(), 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);
    	}
    }
}
0