結果
| 問題 |
No.264 じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-24 20:49:19 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 947 bytes |
| コンパイル時間 | 1,144 ms |
| コンパイル使用メモリ | 112,996 KB |
| 実行使用メモリ | 19,072 KB |
| 最終ジャッジ日時 | 2024-09-16 04:42:26 |
| 合計ジャッジ時間 | 1,487 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.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");
}
}