結果

問題 No.208 王将
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-29 15:35:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 1,000 ms
コード長 407 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 71,216 KB
実行使用メモリ 56,480 KB
最終ジャッジ日時 2023-08-12 08:21:24
合計ジャッジ時間 6,864 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,972 KB
testcase_01 AC 121 ms
55,652 KB
testcase_02 AC 123 ms
56,060 KB
testcase_03 AC 121 ms
55,968 KB
testcase_04 AC 122 ms
55,692 KB
testcase_05 AC 120 ms
56,480 KB
testcase_06 AC 121 ms
56,052 KB
testcase_07 AC 120 ms
55,632 KB
testcase_08 AC 121 ms
56,120 KB
testcase_09 AC 119 ms
56,012 KB
testcase_10 AC 120 ms
55,700 KB
testcase_11 AC 120 ms
56,148 KB
testcase_12 AC 121 ms
55,600 KB
testcase_13 AC 123 ms
56,096 KB
testcase_14 AC 123 ms
55,640 KB
testcase_15 AC 122 ms
56,184 KB
testcase_16 AC 119 ms
55,864 KB
testcase_17 AC 121 ms
55,624 KB
testcase_18 AC 122 ms
56,052 KB
testcase_19 AC 123 ms
55,952 KB
testcase_20 AC 120 ms
55,716 KB
testcase_21 AC 121 ms
56,016 KB
testcase_22 AC 123 ms
55,612 KB
testcase_23 AC 121 ms
55,988 KB
testcase_24 AC 121 ms
56,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int x = scanner.nextInt();
		int y = scanner.nextInt();
		int x2 = scanner.nextInt();
		int y2=scanner.nextInt();
		if(x==y&&x2==y2&&x>x2) {
			System.out.println(Math.max(x, y)+1);
		}else {
			System.out.println(Math.max(x, y));
		}
	}
}
0