結果

問題 No.264 じゃんけん
ユーザー CroweaCrowea
提出日時 2019-01-24 20:48:46
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 947 bytes
コンパイル時間 818 ms
コンパイル使用メモリ 67,912 KB
実行使用メモリ 23,888 KB
最終ジャッジ日時 2023-10-14 09:43:44
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,836 KB
testcase_01 AC 58 ms
21,896 KB
testcase_02 AC 59 ms
23,804 KB
testcase_03 AC 59 ms
23,888 KB
testcase_04 AC 58 ms
23,872 KB
testcase_05 AC 58 ms
21,784 KB
testcase_06 AC 58 ms
21,780 KB
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

    class Program
    {
        const int G = 0;
        const int T = 1;
        const int P = 2;
        static void Main(string[] args)
        {
           var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
           var me = input[0];
           var cpu  = input[1];

                 if (me == G && cpu == T) Console.WriteLine("Won");
            else if (me == G && cpu == G) Console.WriteLine("Drew");
            else if (me == G && cpu == P) Console.WriteLine("Lost");
            else if (me == T && cpu == P) Console.WriteLine("Won");
            else if (me == T && cpu == T) Console.WriteLine("Drew");
            else if (me == P && cpu == G) Console.WriteLine("Won");
            else if (me == P && cpu == T) Console.WriteLine("Drew");
            else                          Console.WriteLine("Lost");
            
        }
    }
0