結果

問題 No.201 yukicoderじゃんけん
ユーザー mencottonmencotton
提出日時 2017-12-29 23:40:35
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 848 bytes
コンパイル時間 2,100 ms
コンパイル使用メモリ 100,448 KB
実行使用メモリ 22,656 KB
最終ジャッジ日時 2023-08-23 09:06:41
合計ジャッジ時間 4,054 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,436 KB
testcase_01 AC 52 ms
20,456 KB
testcase_02 AC 55 ms
22,556 KB
testcase_03 AC 52 ms
22,656 KB
testcase_04 AC 52 ms
22,476 KB
testcase_05 AC 51 ms
20,572 KB
testcase_06 AC 51 ms
20,564 KB
testcase_07 AC 51 ms
20,584 KB
testcase_08 AC 52 ms
20,448 KB
testcase_09 AC 52 ms
20,484 KB
testcase_10 AC 50 ms
18,484 KB
testcase_11 AC 56 ms
20,612 KB
testcase_12 AC 57 ms
22,584 KB
testcase_13 AC 52 ms
20,588 KB
testcase_14 AC 51 ms
20,520 KB
testcase_15 AC 53 ms
20,536 KB
testcase_16 AC 52 ms
20,612 KB
testcase_17 AC 53 ms
22,536 KB
testcase_18 AC 56 ms
20,688 KB
testcase_19 AC 53 ms
20,600 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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]);
                    }
                }
            }
        }
    }
}
0