結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
kmtrc130
|
| 提出日時 | 2017-05-17 15:06:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 844 bytes |
| 記録 | |
| コンパイル時間 | 1,842 ms |
| コンパイル使用メモリ | 108,932 KB |
| 実行使用メモリ | 18,140 KB |
| 最終ジャッジ日時 | 2024-09-17 12:48:11 |
| 合計ジャッジ時間 | 3,373 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
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]); return; }
else { Console.WriteLine(BSPX[0]); return; }
}
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; }
}
}
}
kmtrc130