結果
問題 | No.264 じゃんけん |
ユーザー | Crowea |
提出日時 | 2019-01-24 20:49:19 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 58 ms / 5,000 ms |
コード長 | 947 bytes |
コンパイル時間 | 793 ms |
コンパイル使用メモリ | 66,080 KB |
実行使用メモリ | 23,920 KB |
最終ジャッジ日時 | 2023-10-14 09:43:47 |
合計ジャッジ時間 | 1,905 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 58 ms
23,808 KB |
testcase_01 | AC | 58 ms
21,796 KB |
testcase_02 | AC | 58 ms
23,920 KB |
testcase_03 | AC | 58 ms
21,776 KB |
testcase_04 | AC | 58 ms
21,824 KB |
testcase_05 | AC | 58 ms
21,812 KB |
testcase_06 | AC | 57 ms
19,784 KB |
testcase_07 | AC | 58 ms
21,712 KB |
testcase_08 | AC | 58 ms
21,948 KB |
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { const int G = 0; const int T = 1; const int P = 2; static void Main(string[] args) { var input = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var me = input[0]; var cpu = input[1]; if (me == G && cpu == T) Console.WriteLine("Won"); else if (me == G && cpu == G) Console.WriteLine("Drew"); else if (me == G && cpu == P) Console.WriteLine("Lost"); else if (me == T && cpu == P) Console.WriteLine("Won"); else if (me == T && cpu == T) Console.WriteLine("Drew"); else if (me == P && cpu == G) Console.WriteLine("Won"); else if (me == P && cpu == P) Console.WriteLine("Drew"); else Console.WriteLine("Lost"); } }