結果

問題 No.264 じゃんけん
ユーザー _i1115_i1115
提出日時 2020-04-08 02:50:35
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 683 bytes
コンパイル時間 4,331 ms
コンパイル使用メモリ 103,464 KB
実行使用メモリ 22,756 KB
最終ジャッジ日時 2023-09-22 23:44:37
合計ジャッジ時間 4,070 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,708 KB
testcase_01 AC 55 ms
20,708 KB
testcase_02 AC 55 ms
22,756 KB
testcase_03 AC 55 ms
20,712 KB
testcase_04 AC 56 ms
20,696 KB
testcase_05 AC 55 ms
20,716 KB
testcase_06 AC 55 ms
20,648 KB
testcase_07 AC 55 ms
20,696 KB
testcase_08 AC 55 ms
20,772 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
	const string WON = "Won";
	const string LOST = "Lost";
	const string DREW = "Drew";

	static void Main ()
	{
		string[] nums = Console.ReadLine ().Split (' ');
		int n = int.Parse (nums[0]);
		int k = int.Parse (nums[1]);

		if (n == k)
			Console.WriteLine (DREW);
		else
		{
			switch (n)
			{
				case 0:
					if (k == 1)
						Console.WriteLine (WON);
					else
						Console.WriteLine (LOST);
					break;
				case 1:
					if (k == 2)
						Console.WriteLine (WON);
					else
						Console.WriteLine (LOST);
					break;
				case 2:
					if (k == 0)
						Console.WriteLine (WON);
					else
						Console.WriteLine (LOST);
					break;
			}
		}
	}
}
0