結果

問題 No.208 王将
ユーザー 抹茶アイス
提出日時 2023-07-31 11:45:41
言語 C#
(.NET 8.0.404)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 592 bytes
コンパイル時間 8,320 ms
コンパイル使用メモリ 166,872 KB
実行使用メモリ 184,780 KB
最終ジャッジ日時 2024-10-10 05:15:10
合計ジャッジ時間 10,772 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (107 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace yukicoder
{
    public class Program
    {
        public static void Main()
        {
            var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var b = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            if (a[0] == a[1]&& b[0] == b[1] && b[0] < a[0])
            {
                Console.WriteLine(a[0] + 1);
            }
            else
            {
                Console.WriteLine(Math.Max(a[0], a[1]));
            }
        }
    }
}
0