結果

問題 No.264 じゃんけん
ユーザー cccccc
提出日時 2022-07-14 16:23:08
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 877 bytes
コンパイル時間 13,385 ms
コンパイル使用メモリ 145,488 KB
実行使用メモリ 163,280 KB
最終ジャッジ日時 2023-09-08 06:38:13
合計ジャッジ時間 8,387 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
28,680 KB
testcase_01 AC 51 ms
30,420 KB
testcase_02 AC 50 ms
28,456 KB
testcase_03 AC 51 ms
28,704 KB
testcase_04 AC 51 ms
28,408 KB
testcase_05 AC 51 ms
28,492 KB
testcase_06 AC 51 ms
28,548 KB
testcase_07 AC 50 ms
28,676 KB
testcase_08 AC 51 ms
163,280 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 148 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Linq;
class Program
{
    static void Main()
    {
          /// 0: グー,1:チョキ,2:パー
            /// 0 0 Drew
            /// 0 1 Won
            /// 0 2 lost
            /// 1 0 lost
            /// 1 1 Drew
            /// 1 2 Won
            /// 2 0 Won
            /// 2 1 lost
            /// 2 2 Drew

        var l = Console.ReadLine().Split().Select(int.Parse).ToArray();
        
        if (l[0] == 0 && l[1] == 2)
        {
            Console.WriteLine("Lost");
        }
        else if (l[0] == 2 && l[1] == 0)
        {
            Console.WriteLine("Won");
        }
        else if (l[0] < l[1])
        {
            Console.WriteLine("Won");
        }
        else if (l[0] > l[1])
        {
            Console.WriteLine("Lost");
        }
        else
        {
            Console.WriteLine("Drew");
        }
    }
}
0