結果

問題 No.264 じゃんけん
コンテスト
ユーザー aaa aa
提出日時 2025-11-11 09:06:07
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 1,502 bytes
コンパイル時間 21,659 ms
コンパイル使用メモリ 172,140 KB
実行使用メモリ 186,936 KB
最終ジャッジ日時 2025-11-11 09:06:30
合計ジャッジ時間 10,088 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (121 ミリ秒)。
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
public class Program
{
    public static void Main()
    {
        //int num = int.Parse(Console.ReadLine() ?? string.Empty);
        string[] hand =(Console.ReadLine() ?? string.Empty).Trim().Split(' ');

        int my = int.Parse(hand[0]);
        int you = int.Parse(hand[1]);

        switch (my)
        {
            case 0://ぐー
                if(you == 0)
                {
                    Console.WriteLine("Drew");
                }
                else if(you == 1)
                {
                    Console.WriteLine("Won");
                }
                else
                {
                    Console.WriteLine("Lost");
                }
                break;
            case 1://ちょき
                if (you == 0)
                {
                    Console.WriteLine("Lost");
                }
                else if (you == 1)
                {
                    Console.WriteLine("Drew");
                }
                else
                {
                    Console.WriteLine("Won");
                }
                break;
            default://ぱー
                if (you == 0)
                {
                    Console.WriteLine("Won");
                }
                else if (you == 1)
                {
                    Console.WriteLine("Lost");
                }
                else
                {
                    Console.WriteLine("Drew");
                }
                break;

        }

    }
}
0