結果
| 問題 |
No.264 じゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-15 15:51:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 705 bytes |
| コンパイル時間 | 792 ms |
| コンパイル使用メモリ | 109,656 KB |
| 実行使用メモリ | 26,128 KB |
| 最終ジャッジ日時 | 2024-12-14 15:56:45 |
| 合計ジャッジ時間 | 1,521 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / 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.
ソースコード
// ぐー ちょき ぱー をそれぞれ 0 1 2
// Won, Drew, Lost
// 0 0 -> drew = 0
// 0 1 -> won = -1
// 0 2 -> lost = -2
// 1 0 -> lost = 1
// 1 1 -> drew = 0
// 1 2 -> won = -1
// 2 0 -> won = 2
// 2 1 -> lost = 1
// 2 2 -> drew = 0
using System;
public class Program {
public static void Main() {
string[] s = Console.ReadLine().Split(' ');
int N = int.Parse(s[0]);
int K = int.Parse(s[1]);
if (N == K) {
Console.WriteLine("Drew");
} else if ((N == 0 && K == 1) || (N == 1 && K == 2) || (N == 2 && K == 1)) {
Console.WriteLine("Won");
} else if ((N == 0 && K == 2) || (N == 1 && K == 0) || (N == 2 && K == 1)) {
Console.WriteLine("Lost");
}
}
}