結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー mencottonmencotton
提出日時 2018-02-19 16:18:16
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 403 bytes
コンパイル時間 2,431 ms
コンパイル使用メモリ 101,532 KB
実行使用メモリ 26,032 KB
最終ジャッジ日時 2023-09-22 08:48:32
合計ジャッジ時間 5,558 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,812 KB
testcase_01 AC 59 ms
19,728 KB
testcase_02 AC 60 ms
21,936 KB
testcase_03 AC 59 ms
21,928 KB
testcase_04 AC 61 ms
22,020 KB
testcase_05 WA -
testcase_06 AC 60 ms
23,804 KB
testcase_07 AC 61 ms
21,936 KB
testcase_08 AC 60 ms
19,880 KB
testcase_09 AC 60 ms
21,908 KB
testcase_10 AC 60 ms
19,696 KB
testcase_11 AC 61 ms
22,012 KB
testcase_12 AC 60 ms
19,912 KB
testcase_13 AC 61 ms
22,008 KB
testcase_14 AC 60 ms
19,868 KB
testcase_15 AC 61 ms
23,956 KB
testcase_16 AC 61 ms
21,892 KB
testcase_17 AC 61 ms
21,808 KB
testcase_18 AC 60 ms
23,892 KB
testcase_19 AC 59 ms
21,912 KB
testcase_20 AC 60 ms
21,808 KB
testcase_21 AC 60 ms
21,944 KB
testcase_22 AC 61 ms
21,960 KB
testcase_23 AC 59 ms
23,964 KB
testcase_24 AC 60 ms
21,896 KB
testcase_25 AC 60 ms
21,976 KB
testcase_26 AC 60 ms
21,928 KB
testcase_27 AC 60 ms
21,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace _521
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            if (x[1] <= 0 || x[0] <= x[1]) Console.WriteLine(0);
            else if (x[0] == x[1] * 2 - 1) Console.WriteLine(x[0] - 1);
            else Console.WriteLine(x[0] - 2);
        }
    }
}
0