using System; using System.Collections.Generic; class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("Alice 114 R"); WillReturn.Add("Bob 514 S"); //Bob //普通のじゃんけんならば //R(グー)を出したAliceがS(チョキ)を出したBobに勝ちますが、 //これはyukicoderじゃんけんなのでゆるふわポイントの多いBobの勝ちです。 } else if (InputPattern == "Input2") { WillReturn.Add("touritsu 99999999999999999999 P"); WillReturn.Add("Peter 99999999999999999998 R"); //touritsu //ゆるふわガチ勢のtouritsuさんとPeterさんの戦いです。 //僅差ですがtouritsuさんの勝ちです。 } else if (InputPattern == "Input3") { WillReturn.Add("Taro 0 R"); WillReturn.Add("Hanako 0 S"); //-1 //まだ初心者の二人はゆるふわポイントを持っていません。 //0ポイント同士で引き分けです。 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); string[] wkArr = { }; Action SplitAct = (pStr) => wkArr = pStr.Split(' '); SplitAct(InputList[0]); string SA = wkArr[0], PA = wkArr[1]; SplitAct(InputList[1]); string SB = wkArr[0], PB = wkArr[1]; int MaxLen = Math.Max(PA.Length, PB.Length); PA = PA.PadLeft(MaxLen, '0'); PB = PB.PadLeft(MaxLen, '0'); int Comp = PA.CompareTo(PB); if (Comp > 0) Console.WriteLine(SA); if (Comp < 0) Console.WriteLine(SB); if (Comp == 0) Console.WriteLine(-1); } }