結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2017-05-17 15:03:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 828 bytes |
コンパイル時間 | 2,808 ms |
コンパイル使用メモリ | 111,360 KB |
実行使用メモリ | 26,132 KB |
最終ジャッジ日時 | 2024-09-17 12:48:06 |
合計ジャッジ時間 | 3,462 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 5 |
コンパイルメッセージ
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; class Program { static void Main(string[] args) { string[] ASPX = Console.ReadLine().Split(' '); string[] BSPX = Console.ReadLine().Split(' '); string ap = ASPX[1]; string bp = BSPX[1]; if (ap == bp) { Console.WriteLine(-1); } if (ap.Length != bp.Length) { if (ap.Length > bp.Length) { Console.WriteLine(ASPX[0]); } else { Console.WriteLine(BSPX[0]); } } for (int i = 0; i < ap.Length; i++) { if (int.Parse(ap.Substring(i, 1)) == int.Parse(bp.Substring(i, 1))) { continue; } if (int.Parse(ap.Substring(i, 1)) > int.Parse(bp.Substring(i, 1))) { Console.WriteLine(ASPX[0]); break; } else { Console.WriteLine(BSPX[0]); break; } } } }