結果

問題 No.264 じゃんけん
ユーザー itok217
提出日時 2017-04-09 19:08:34
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 506 bytes
コンパイル時間 877 ms
コンパイル使用メモリ 112,240 KB
実行使用メモリ 27,008 KB
最終ジャッジ日時 2024-07-18 01:36:10
合計ジャッジ時間 1,395 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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;
using System.Linq;

class Program {
    static void Main() {
        int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray();
        if (n[0] == n[1]) {
            Console.WriteLine("Drew");
        } else if (n[0] == 0) {
            Console.WriteLine(n[1] == 1 ? "Won" : "Lost");
        } else if (n[0] == 1) {
            Console.WriteLine(n[1] == 2 ? "Won" : "Lost");
        } else if (n[0] == 2) {
            Console.WriteLine(n[1] == 0 ? "Won" : "Lost");
        }
    }
}
0