結果

問題 No.531 エヌスクミ島の平和協定
ユーザー bluemeganebluemegane
提出日時 2018-09-12 13:02:46
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 1,912 ms
コンパイル使用メモリ 101,204 KB
実行使用メモリ 22,868 KB
最終ジャッジ日時 2023-09-08 18:29:40
合計ジャッジ時間 5,908 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 57 ms
20,780 KB
testcase_02 AC 57 ms
22,756 KB
testcase_03 AC 57 ms
20,668 KB
testcase_04 AC 56 ms
20,712 KB
testcase_05 AC 57 ms
20,692 KB
testcase_06 AC 56 ms
20,820 KB
testcase_07 AC 57 ms
20,720 KB
testcase_08 AC 57 ms
18,672 KB
testcase_09 AC 57 ms
20,716 KB
testcase_10 WA -
testcase_11 AC 59 ms
22,744 KB
testcase_12 AC 60 ms
22,868 KB
testcase_13 AC 60 ms
22,744 KB
testcase_14 AC 59 ms
22,788 KB
testcase_15 AC 57 ms
20,680 KB
testcase_16 AC 57 ms
20,828 KB
testcase_17 AC 58 ms
22,848 KB
testcase_18 WA -
testcase_19 AC 58 ms
20,692 KB
testcase_20 AC 57 ms
20,712 KB
testcase_21 AC 58 ms
22,732 KB
testcase_22 AC 57 ms
20,648 KB
testcase_23 AC 57 ms
22,800 KB
testcase_24 AC 57 ms
22,744 KB
testcase_25 AC 56 ms
20,700 KB
testcase_26 AC 58 ms
20,760 KB
testcase_27 AC 58 ms
20,804 KB
testcase_28 AC 58 ms
22,784 KB
testcase_29 AC 57 ms
22,752 KB
testcase_30 AC 57 ms
20,828 KB
testcase_31 AC 57 ms
18,752 KB
testcase_32 AC 58 ms
20,664 KB
testcase_33 AC 56 ms
20,680 KB
testcase_34 AC 57 ms
20,624 KB
testcase_35 AC 57 ms
20,892 KB
testcase_36 AC 58 ms
20,808 KB
testcase_37 AC 57 ms
20,708 KB
testcase_38 AC 57 ms
20,704 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        if (m >= n) { Console.WriteLine(1); goto end; }
        int ans;
        if (n % 2 == 0 && m >= n / 2) ans = 2;
        else if (n % 2 == 1 && m >= (n + 1) / 2) ans = 2;
        else ans = -1;
        Console.WriteLine(ans);
        end:;
    }
}
0