結果
| 問題 | 
                            No.201 yukicoderじゃんけん
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mencotton
                         | 
                    
| 提出日時 | 2017-12-29 23:40:35 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 26 ms / 5,000 ms | 
| コード長 | 848 bytes | 
| コンパイル時間 | 772 ms | 
| コンパイル使用メモリ | 112,676 KB | 
| 実行使用メモリ | 26,096 KB | 
| 最終ジャッジ日時 | 2024-12-21 10:38:48 | 
| 合計ジャッジ時間 | 2,027 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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.Collections.Generic;
using System.Linq;
namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] a = Console.ReadLine().Split();
            string[] b = Console.ReadLine().Split();
            if (a[1] == b[1]) Console.WriteLine(-1);
            else if (a[1].Length != b[1].Length)
            {
                Console.WriteLine(a[1].Length > b[1].Length ? a[0] : b[0]);
            }
            else
            {
                bool flag = true;
                for (int i = 0; flag; i++)
                {
                    if (a[1][i] != b[1][i])
                    {
                        flag = false;
                        Console.WriteLine(a[1][i] > b[1][i] ? a[0] : b[0]);
                    }
                }
            }
        }
    }
}
            
            
            
        
            
mencotton