結果

問題 No.264 じゃんけん
ユーザー eringi103eringi103
提出日時 2016-10-20 15:14:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 1,076 bytes
コンパイル時間 1,975 ms
コンパイル使用メモリ 104,884 KB
実行使用メモリ 22,784 KB
最終ジャッジ日時 2023-08-14 17:15:38
合計ジャッジ時間 3,108 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

public class Program
{
  static void Main()
  {
    string Jyanken = Console.ReadLine();

    int Me = Convert.ToInt32(Jyanken.Substring(0,1));
    int You = Convert.ToInt32(Jyanken.Substring(2,1));

    switch(Me)
    {
      case 0:
        if (You == 0)
        {
          Console.WriteLine("Drew");
        }
        else if (You == 1)
        {
          Console.WriteLine("Won");
        }
        else if (You == 2)
        {
          Console.WriteLine("Lost");
        }
        break;
      case 1:
        if (You == 0)
        {
          Console.WriteLine("Lost");
        }
        else if (You == 1)
        {
          Console.WriteLine("Drew");
        }
        else if (You == 2)
        {
          Console.WriteLine("Won");
        }
        break;
      case 2:
        if (You == 0)
        {
          Console.WriteLine("Won");
        }
        else if (You == 1)
        {
          Console.WriteLine("Lost");
        }
        else if (You == 2)
        {
          Console.WriteLine("Drew");
        }
        break;
    }    
  }
}
0