結果

問題 No.208 王将
ユーザー tubo28
提出日時 2015-05-18 13:17:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 1,000 ms
コード長 620 bytes
コンパイル時間 983 ms
コンパイル使用メモリ 103,424 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-10-09 16:23:40
合計ジャッジ時間 2,394 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 Myon
{
    static void Main()
    {
        string[] ss;
        ss = Console.ReadLine().Split(' ');
        long x = long.Parse(ss[0]);
        long y = long.Parse(ss[1]);
        ss = Console.ReadLine().Split(' ');
        long xx = long.Parse(ss[0]);
        long yy = long.Parse(ss[1]);
        long ans;
        if(xx==yy && x==y && xx < x)
        {
            ans = x + 1;
        }
        else
        {
            ans = Math.Max(x, y);
        }
        Console.WriteLine(ans);
    }
}
0