結果

問題 No.531 エヌスクミ島の平和協定
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-06-24 00:03:44
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 3,494 ms
コンパイル使用メモリ 71,952 KB
実行使用メモリ 58,020 KB
最終ジャッジ日時 2023-07-28 04:45:02
合計ジャッジ時間 8,681 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,980 KB
testcase_01 AC 122 ms
55,824 KB
testcase_02 AC 122 ms
55,788 KB
testcase_03 AC 122 ms
55,904 KB
testcase_04 AC 121 ms
55,460 KB
testcase_05 AC 121 ms
55,712 KB
testcase_06 AC 122 ms
55,960 KB
testcase_07 AC 122 ms
56,060 KB
testcase_08 WA -
testcase_09 AC 120 ms
56,028 KB
testcase_10 AC 122 ms
55,860 KB
testcase_11 AC 121 ms
55,648 KB
testcase_12 AC 122 ms
55,788 KB
testcase_13 AC 123 ms
58,020 KB
testcase_14 AC 126 ms
55,956 KB
testcase_15 AC 123 ms
56,320 KB
testcase_16 AC 125 ms
55,844 KB
testcase_17 AC 124 ms
56,028 KB
testcase_18 AC 120 ms
55,840 KB
testcase_19 AC 122 ms
55,688 KB
testcase_20 AC 121 ms
55,948 KB
testcase_21 AC 121 ms
55,608 KB
testcase_22 AC 121 ms
56,008 KB
testcase_23 AC 122 ms
55,668 KB
testcase_24 AC 123 ms
55,416 KB
testcase_25 AC 121 ms
55,764 KB
testcase_26 AC 123 ms
55,592 KB
testcase_27 AC 121 ms
55,704 KB
testcase_28 AC 122 ms
55,844 KB
testcase_29 AC 124 ms
55,832 KB
testcase_30 AC 124 ms
55,764 KB
testcase_31 AC 122 ms
55,680 KB
testcase_32 AC 122 ms
56,212 KB
testcase_33 AC 123 ms
55,652 KB
testcase_34 AC 121 ms
55,896 KB
testcase_35 AC 122 ms
55,872 KB
testcase_36 AC 123 ms
55,436 KB
testcase_37 AC 122 ms
55,708 KB
testcase_38 AC 124 ms
56,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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