結果

問題 No.201 yukicoderじゃんけん
ユーザー しらゆきしらゆき
提出日時 2015-11-18 14:18:50
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 799 bytes
コンパイル時間 1,970 ms
コンパイル使用メモリ 101,352 KB
実行使用メモリ 25,452 KB
最終ジャッジ日時 2023-10-11 17:59:08
合計ジャッジ時間 5,123 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
21,396 KB
testcase_01 AC 72 ms
21,388 KB
testcase_02 AC 76 ms
21,404 KB
testcase_03 AC 74 ms
21,292 KB
testcase_04 WA -
testcase_05 AC 73 ms
23,444 KB
testcase_06 AC 74 ms
23,452 KB
testcase_07 AC 72 ms
21,416 KB
testcase_08 AC 74 ms
23,364 KB
testcase_09 AC 75 ms
21,344 KB
testcase_10 AC 73 ms
21,348 KB
testcase_11 AC 85 ms
23,564 KB
testcase_12 AC 84 ms
23,288 KB
testcase_13 AC 73 ms
23,396 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 73 ms
21,488 KB
testcase_17 AC 74 ms
21,512 KB
testcase_18 AC 693 ms
23,380 KB
testcase_19 AC 73 ms
21,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        string[] a = Console.ReadLine().Split();
        string[] b = Console.ReadLine().Split();

        if (a.Length > b.Length) Console.WriteLine(a[0]);
        else if (a.Length < b.Length) Console.WriteLine(b[0]);
        else
        {
            for(int i = 0; i < a[1].Length; i++)
            {
                string A = a[1];
                string B = b[1];

                if (A.CompareTo(B) > 0) 
                {
                    Console.WriteLine(a[0]);
                    return;
                }
                else if(A.CompareTo(B) < 0)
                {
                    Console.WriteLine(b[0]);
                    return;
                }
            }
        }

        Console.WriteLine(-1);
    }
}
0