結果

問題 No.1314 N言っちゃダメゲーム (5)
ユーザー keymoonkeymoon
提出日時 2021-01-18 11:13:37
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 1,000 ms
コード長 896 bytes
コンパイル時間 3,605 ms
コンパイル使用メモリ 99,484 KB
実行使用メモリ 23,992 KB
最終ジャッジ日時 2023-08-20 18:48:48
合計ジャッジ時間 6,284 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
23,816 KB
testcase_01 AC 60 ms
23,848 KB
testcase_02 AC 60 ms
23,992 KB
testcase_03 AC 59 ms
23,928 KB
testcase_04 AC 60 ms
23,840 KB
testcase_05 AC 60 ms
23,696 KB
testcase_06 AC 59 ms
23,804 KB
testcase_07 AC 59 ms
21,912 KB
testcase_08 AC 59 ms
19,832 KB
testcase_09 AC 60 ms
23,972 KB
testcase_10 AC 60 ms
21,964 KB
testcase_11 AC 60 ms
21,864 KB
testcase_12 AC 59 ms
21,792 KB
testcase_13 AC 59 ms
21,872 KB
testcase_14 AC 59 ms
19,872 KB
testcase_15 AC 59 ms
21,876 KB
testcase_16 AC 59 ms
21,848 KB
testcase_17 AC 59 ms
19,832 KB
testcase_18 AC 59 ms
21,804 KB
testcase_19 AC 59 ms
21,720 KB
testcase_20 AC 59 ms
21,944 KB
testcase_21 AC 59 ms
21,960 KB
testcase_22 AC 59 ms
19,840 KB
testcase_23 AC 59 ms
21,908 KB
testcase_24 AC 60 ms
19,756 KB
testcase_25 AC 60 ms
21,776 KB
testcase_26 AC 59 ms
22,056 KB
testcase_27 AC 61 ms
23,820 KB
testcase_28 AC 59 ms
23,904 KB
testcase_29 AC 60 ms
21,944 KB
testcase_30 AC 60 ms
23,924 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.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        // (N-1)%(k+1)!=0ならば先手必勝、そうでないならば後手必勝
        var mk = Console.ReadLine().Split().Select(int.Parse).ToArray();
        var m = mk[0];
        var k = mk[1];
        var winSecond = (m - 1) / (k + 1);
        var winFirst = (m - 1) - winSecond;

        var me = (winFirst + 1) / 2 + (winFirst % 2 == 1 ? winSecond : 0);
        var grant = (m - 1) - me;

        if (me > grant) Console.WriteLine("Win");
        if (me < grant) Console.WriteLine("Lose");
        if (me == grant) Console.WriteLine("Draw");
    }
}
0