結果

問題 No.208 王将
ユーザー Grenache
提出日時 2015-05-15 22:32:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 3,672 ms
コンパイル使用メモリ 75,040 KB
実行使用メモリ 54,340 KB
最終ジャッジ日時 2024-10-09 16:17:49
合計ジャッジ時間 8,243 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main_yukicoder208 {
	
	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();

		int ret = Math.max(x,  y);
		if (x == y && x2 == y2 && x2 < x) {
			ret++;
		}
		
		System.out.println(ret);
		
		sc.close();
	}
}
0