結果

問題 No.208 王将
ユーザー GrenacheGrenache
提出日時 2015-05-15 22:32:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 1,000 ms
コード長 376 bytes
コンパイル時間 3,519 ms
コンパイル使用メモリ 74,836 KB
実行使用メモリ 41,708 KB
最終ジャッジ日時 2024-04-17 22:34:42
合計ジャッジ時間 7,930 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,204 KB
testcase_01 AC 137 ms
41,352 KB
testcase_02 AC 136 ms
41,436 KB
testcase_03 AC 139 ms
41,384 KB
testcase_04 AC 135 ms
41,524 KB
testcase_05 AC 138 ms
41,268 KB
testcase_06 AC 137 ms
41,668 KB
testcase_07 AC 139 ms
41,456 KB
testcase_08 AC 140 ms
41,492 KB
testcase_09 AC 136 ms
41,392 KB
testcase_10 AC 133 ms
41,708 KB
testcase_11 AC 123 ms
40,356 KB
testcase_12 AC 135 ms
41,304 KB
testcase_13 AC 134 ms
41,276 KB
testcase_14 AC 137 ms
41,416 KB
testcase_15 AC 134 ms
41,388 KB
testcase_16 AC 142 ms
41,648 KB
testcase_17 AC 136 ms
41,452 KB
testcase_18 AC 136 ms
41,388 KB
testcase_19 AC 136 ms
41,528 KB
testcase_20 AC 135 ms
41,468 KB
testcase_21 AC 136 ms
41,276 KB
testcase_22 AC 136 ms
41,132 KB
testcase_23 AC 137 ms
41,424 KB
testcase_24 AC 134 ms
41,648 KB
権限があれば一括ダウンロードができます

ソースコード

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