結果

問題 No.1314 N言っちゃダメゲーム (5)
ユーザー さかぽん
提出日時 2020-12-16 21:50:11
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 2,847 ms
コンパイル使用メモリ 111,768 KB
実行使用メモリ 28,332 KB
最終ジャッジ日時 2024-09-20 05:21:36
合計ジャッジ時間 4,755 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 11 WA * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class K
{
	static int[] Read() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	static (int, int) Read2() { var a = Read(); return (a[0], a[1]); }
	static void Main()
	{
		var (m, k) = Read2();

		var wins = (m - 1) / (k + 1);
		var w1 = wins / 2;
		var w2 = m - 1 - w1;
		if (wins % 2 == 1) (w1, w2) = (w2, w1);
		Console.WriteLine(w1 > w2 ? "Win" : w1 < w2 ? "Lose" : "Draw");
	}
}
0