結果

問題 No.201 yukicoderじゃんけん
ユーザー akichiakichi
提出日時 2017-08-11 16:43:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 686 bytes
コンパイル時間 3,235 ms
コンパイル使用メモリ 99,644 KB
実行使用メモリ 22,668 KB
最終ジャッジ日時 2023-08-02 22:29:02
合計ジャッジ時間 5,219 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
20,620 KB
testcase_01 AC 46 ms
20,564 KB
testcase_02 AC 46 ms
20,540 KB
testcase_03 AC 46 ms
20,480 KB
testcase_04 AC 46 ms
20,596 KB
testcase_05 AC 48 ms
22,628 KB
testcase_06 AC 48 ms
22,484 KB
testcase_07 AC 46 ms
20,596 KB
testcase_08 AC 50 ms
20,480 KB
testcase_09 AC 50 ms
20,608 KB
testcase_10 AC 49 ms
20,688 KB
testcase_11 AC 49 ms
20,548 KB
testcase_12 AC 49 ms
22,560 KB
testcase_13 AC 50 ms
22,668 KB
testcase_14 AC 48 ms
20,480 KB
testcase_15 AC 47 ms
20,500 KB
testcase_16 AC 49 ms
20,704 KB
testcase_17 AC 49 ms
22,560 KB
testcase_18 AC 49 ms
20,700 KB
testcase_19 AC 47 ms
20,568 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 ans = "-1";
        string[] a = Console.ReadLine().Split(' ');
        string[] b = Console.ReadLine().Split(' ');
        int al = a[1].Length;

        if (al < b[1].Length) {
            ans = b[0];
        } else if (al > b[1].Length) {
            ans = a[0];
        } else {

            for (int p = 0; p < al; p++) {
                if (a[1][p] < b[1][p]) {
                    ans = b[0];
                    break;
                } else if (a[1][p] > b[1][p]) {
                    ans = a[0];
                    break;
                }
            }
        }
        Console.WriteLine(ans);
    }
}
0