結果
| 問題 |
No.264 じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-24 20:48:46 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 947 bytes |
| コンパイル時間 | 849 ms |
| コンパイル使用メモリ | 114,688 KB |
| 実行使用メモリ | 29,568 KB |
| 最終ジャッジ日時 | 2024-09-16 04:42:24 |
| 合計ジャッジ時間 | 1,461 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 == T) Console.WriteLine("Drew");
else Console.WriteLine("Lost");
}
}