結果

問題 No.264 じゃんけん
ユーザー oldlevinoldlevin
提出日時 2020-02-21 05:19:27
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 898 bytes
コンパイル時間 882 ms
コンパイル使用メモリ 104,192 KB
実行使用メモリ 19,200 KB
最終ジャッジ日時 2024-04-17 06:42:15
合計ジャッジ時間 1,566 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
19,072 KB
testcase_01 AC 28 ms
19,200 KB
testcase_02 AC 27 ms
18,816 KB
testcase_03 AC 28 ms
19,072 KB
testcase_04 AC 28 ms
19,072 KB
testcase_05 AC 27 ms
18,944 KB
testcase_06 AC 28 ms
19,072 KB
testcase_07 AC 27 ms
19,072 KB
testcase_08 AC 27 ms
19,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
using System.Collections.Generic;
using static System.Console;

public class hello{
    public static void Main(){

        //yukicoder No.264じゃんけん
        //ぐー, ちょき, ぱーをそれぞれ 0, 1, 2とし、1つ目に自分のが2つ目に相手のが与えられます。
        //自分が勝ったら「Won」、自分が負けたら「Lost」、引き分けなら「Drew」
        
        var s = ReadLine().Trim().Split(' ').Select(int.Parse).ToArray();
        var my = s[0];
        var you =s[1];
        
        if(my==you) { WriteLine("Drew"); goto fin;}
        if(my==0    &&  you== 1    ) { WriteLine("Won"); goto fin;}
        if(my==1    &&  you== 2    ) { WriteLine("Won"); goto fin;}
        if(my==2    &&  you== 0    ) { WriteLine("Won"); goto fin;}
        
        WriteLine("Lost");

        fin:;
    }
}//end hello
0