結果

問題 No.201 yukicoderじゃんけん
ユーザー mbanmban
提出日時 2016-11-04 14:30:45
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 974 bytes
コンパイル時間 1,998 ms
コンパイル使用メモリ 105,096 KB
実行使用メモリ 24,760 KB
最終ジャッジ日時 2023-08-16 13:43:34
合計ジャッジ時間 4,440 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,796 KB
testcase_01 AC 55 ms
20,728 KB
testcase_02 AC 55 ms
22,672 KB
testcase_03 AC 52 ms
22,576 KB
testcase_04 AC 51 ms
22,508 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 55 ms
20,784 KB
testcase_08 AC 57 ms
22,756 KB
testcase_09 AC 56 ms
20,876 KB
testcase_10 AC 51 ms
18,584 KB
testcase_11 AC 54 ms
20,536 KB
testcase_12 AC 55 ms
20,496 KB
testcase_13 AC 56 ms
20,780 KB
testcase_14 AC 50 ms
20,472 KB
testcase_15 AC 51 ms
20,468 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 56 ms
20,604 KB
testcase_19 AC 57 ms
20,784 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;
using System.Text;
using System.Threading.Tasks;

class Magatro
{
    static void Main()
    {
        string[] A = Console.ReadLine().Split(' ');
        string[] B = Console.ReadLine().Split(' ');
        string a = A[1];
        string b = B[1];

        if (a == b)
        {
            Console.WriteLine(-1);
            return;
        }
        if (Big(a, b))
        {
            Console.WriteLine(A[0]);
            return;
        }
        Console.WriteLine(B[0]);
    }
    static bool Big(string a,string b)
    {
        if (a.Length > b.Length)
        {
            return true;
        }
        if (a.Length < b.Length)
        {
            return false;
        }
        for(int i = 0; i < a.Length; i++)
        {
            if (int.Parse(a[i].ToString()) > int.Parse(b[i].ToString()))
            {
                return true;
            }
        }
        return false;
    }
}
0