結果

問題 No.264 じゃんけん
ユーザー eringi103
提出日時 2016-10-20 15:14:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 23 ms / 5,000 ms
コード長 1,076 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 111,888 KB
実行使用メモリ 17,792 KB
最終ジャッジ日時 2024-11-22 16:17:20
合計ジャッジ時間 1,643 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
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