結果

問題 No.208 王将
ユーザー koheiarai94
提出日時 2017-09-25 01:47:09
言語 Java
(openjdk 23)
結果
AC  
実行時間 130 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 74,636 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-11-14 07:37:01
合計ジャッジ時間 5,961 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

// Yuki 208
// https://yukicoder.me/problems/no/208

public class Main {
	
	public static void main (String[] args) throws InterruptedException {
		Scanner in = new Scanner(System.in);
		
		int x = in.nextInt();
		int y = in.nextInt();
		int x1 = in.nextInt();
		int y1 = in.nextInt();
		
		long answer = Math.max(x, y);
		if (x1 < x && y1 < y && x == y && x1 == y1) {
			answer++;
		}
		System.out.println(answer);
	}
}
0