結果
| 問題 | No.208 王将 |
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2018-10-26 10:27:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 1,000 ms |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 803 ms |
| コンパイル使用メモリ | 105,316 KB |
| 実行使用メモリ | 26,260 KB |
| 最終ジャッジ日時 | 2024-11-19 06:02:12 |
| 合計ジャッジ時間 | 2,271 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.
ソースコード
using static System.Math;
using System;
public class Hello
{
public static void Main()
{
string[] line = Console.ReadLine().Trim().Split(' ');
var x = int.Parse(line[0]);
var y = int.Parse(line[1]);
line = Console.ReadLine().Trim().Split(' ');
var x2 = int.Parse(line[0]);
var y2 = int.Parse(line[1]);
var ans = getAns(x, y, x2, y2);
Console.WriteLine(ans);
}
public static int getAns(int x, int y, int x2, int y2) => x == y && x2 == y2 && x > x2 ? x + 1 : Max(x, y);
}
bluemegane