結果

問題 No.208 王将
ユーザー Daigo HIROOKA
提出日時 2018-05-24 22:49:57
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 329 bytes
コンパイル時間 3,242 ms
コンパイル使用メモリ 74,908 KB
実行使用メモリ 41,636 KB
最終ジャッジ日時 2024-06-28 17:33:26
合計ジャッジ時間 6,542 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No208{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int x = sc.nextInt();
		int y = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();

		if(x == y && x2 == y2 && x2 < x) System.out.println(x+1);
		else System.out.println(Math.max(x, y));
	}
}
0