結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
41,408 KB
testcase_01 AC 136 ms
41,312 KB
testcase_02 AC 136 ms
41,264 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 135 ms
41,324 KB
testcase_08 WA -
testcase_09 AC 135 ms
41,340 KB
testcase_10 AC 133 ms
41,372 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 134 ms
41,396 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 131 ms
41,068 KB
testcase_18 AC 130 ms
41,520 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 132 ms
41,452 KB
testcase_22 WA -
testcase_23 AC 130 ms
41,292 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 127 ms
41,212 KB
testcase_31 WA -
testcase_32 AC 132 ms
41,504 KB
testcase_33 AC 133 ms
41,304 KB
testcase_34 WA -
testcase_35 AC 130 ms
41,208 KB
testcase_36 AC 130 ms
41,560 KB
testcase_37 AC 131 ms
41,144 KB
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.lang.*;
 
public class Main {
    public static void main(String[] args) {

        Scanner sc  = new Scanner(System.in);

        int n= Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        if((m+n)%2==0)System.out.print(m/n);
        else System.out.print("-1");
        
        System.out.println();
    }

}
0