結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
|
提出日時 | 2017-08-22 09:38:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,036 bytes |
コンパイル時間 | 863 ms |
コンパイル使用メモリ | 111,500 KB |
実行使用メモリ | 25,692 KB |
最終ジャッジ日時 | 2024-10-15 04:19:31 |
合計ジャッジ時間 | 2,118 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 RE * 17 |
コンパイルメッセージ
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; public class yukicoder { public static int convert(string s) { if(s == "r") return 0; else if(s == "s") return 1; else return 2; } public static void Main() { string[] a = Console.ReadLine().Split(' '); string[] b = Console.ReadLine().Split(' '); decimal aa = decimal.Parse(a[1]); decimal bb = decimal.Parse(b[1]); int aaa = convert(a[2]); int bbb = convert(b[2]); if(aa != bb) { if(aa > bb) { Console.WriteLine(a[0]); } else { Console.WriteLine(b[0]); } } else { if(aaa == bbb) { Console.WriteLine("-1"); } else if(aaa - bbb == -1 || aaa - bbb == 2) { Console.WriteLine(a[0]); } else { Console.WriteLine(b[0]); } } } }