結果

問題 No.264 じゃんけん
ユーザー santasanta
提出日時 2020-07-23 22:37:59
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 1,245 bytes
コンパイル時間 2,239 ms
コンパイル使用メモリ 102,156 KB
実行使用メモリ 22,784 KB
最終ジャッジ日時 2023-09-06 02:33:24
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
20,772 KB
testcase_01 AC 56 ms
20,648 KB
testcase_02 AC 56 ms
20,704 KB
testcase_03 AC 55 ms
20,636 KB
testcase_04 AC 55 ms
20,824 KB
testcase_05 AC 55 ms
22,740 KB
testcase_06 AC 55 ms
20,712 KB
testcase_07 AC 56 ms
22,784 KB
testcase_08 AC 55 ms
20,768 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 ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var rl = Console.ReadLine().Split(' ');
            var i = int.Parse(rl[0]);
            var y = int.Parse(rl[1]);
            var result = string.Empty;

            if(i == y)
            {
                result = "Drew";
            }
            else if(i == 0)
            {
                if(y == 1)
                {
                    result = "Won";
                }
                else if(y == 2)
                {
                    result = "Lost";
                }
            }
            else if (i == 1)
            {
                if (y == 2)
                {
                    result = "Won";
                }
                else if (y == 0)
                {
                    result = "Lost";
                }
            }
            else if (i == 2)
            {
                if (y == 0)
                {
                    result = "Won";
                }
                else if (y == 1)
                {
                    result = "Lost";
                }
            }
            
            Console.WriteLine($"{result}");
        }
    }
}
0