結果

問題 No.201 yukicoderじゃんけん
ユーザー しらゆきしらゆき
提出日時 2015-11-18 14:23:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 692 ms / 5,000 ms
コード長 888 bytes
コンパイル時間 1,908 ms
コンパイル使用メモリ 99,880 KB
実行使用メモリ 23,396 KB
最終ジャッジ日時 2023-10-11 17:59:16
合計ジャッジ時間 5,011 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
23,396 KB
testcase_01 AC 72 ms
23,380 KB
testcase_02 AC 76 ms
21,384 KB
testcase_03 AC 52 ms
20,444 KB
testcase_04 AC 53 ms
18,508 KB
testcase_05 AC 75 ms
21,464 KB
testcase_06 AC 74 ms
21,392 KB
testcase_07 AC 72 ms
21,560 KB
testcase_08 AC 72 ms
19,408 KB
testcase_09 AC 72 ms
21,360 KB
testcase_10 AC 52 ms
20,424 KB
testcase_11 AC 83 ms
21,404 KB
testcase_12 AC 83 ms
21,388 KB
testcase_13 AC 72 ms
19,476 KB
testcase_14 AC 50 ms
20,592 KB
testcase_15 AC 52 ms
20,560 KB
testcase_16 AC 73 ms
21,384 KB
testcase_17 AC 74 ms
21,364 KB
testcase_18 AC 692 ms
21,440 KB
testcase_19 AC 73 ms
21,348 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();

        string A = a[1];
        string B = b[1];

        if (A.Length > B.Length)
        {
            Console.WriteLine(a[0]);
            return;
        }
        else if (A.Length < B.Length)
        {
            Console.WriteLine(b[0]);
            return;
        }
        else
        {
            for (int i = 0; i < a[1].Length; i++)
            {
                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