結果

問題 No.201 yukicoderじゃんけん
ユーザー akichiakichi
提出日時 2017-08-11 16:43:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 686 bytes
コンパイル時間 823 ms
コンパイル使用メモリ 110,168 KB
実行使用メモリ 25,944 KB
最終ジャッジ日時 2024-04-20 22:21:21
合計ジャッジ時間 2,109 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
23,896 KB
testcase_01 AC 25 ms
23,436 KB
testcase_02 AC 25 ms
25,944 KB
testcase_03 AC 25 ms
23,560 KB
testcase_04 AC 25 ms
23,812 KB
testcase_05 AC 25 ms
23,472 KB
testcase_06 AC 25 ms
23,692 KB
testcase_07 AC 25 ms
23,644 KB
testcase_08 AC 24 ms
23,816 KB
testcase_09 AC 24 ms
23,524 KB
testcase_10 AC 24 ms
23,596 KB
testcase_11 AC 24 ms
25,476 KB
testcase_12 AC 24 ms
23,604 KB
testcase_13 AC 25 ms
23,696 KB
testcase_14 AC 26 ms
25,736 KB
testcase_15 AC 25 ms
23,516 KB
testcase_16 AC 24 ms
23,904 KB
testcase_17 AC 25 ms
23,776 KB
testcase_18 AC 25 ms
25,720 KB
testcase_19 AC 25 ms
25,692 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