結果
問題 |
No.264 じゃんけん
|
ユーザー |
![]() |
提出日時 | 2020-02-21 05:19:27 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 898 bytes |
コンパイル時間 | 2,026 ms |
コンパイル使用メモリ | 109,360 KB |
実行使用メモリ | 18,944 KB |
最終ジャッジ日時 | 2024-10-08 19:42:12 |
合計ジャッジ時間 | 1,726 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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