結果

問題 No.208 王将
ユーザー tentententen
提出日時 2020-10-07 11:41:50
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 1,713 ms
コンパイル使用メモリ 71,192 KB
実行使用メモリ 56,264 KB
最終ジャッジ日時 2023-09-27 09:11:40
合計ジャッジ時間 6,708 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,688 KB
testcase_01 AC 113 ms
55,824 KB
testcase_02 AC 110 ms
55,752 KB
testcase_03 AC 113 ms
55,472 KB
testcase_04 AC 114 ms
56,264 KB
testcase_05 AC 112 ms
55,980 KB
testcase_06 WA -
testcase_07 AC 107 ms
55,892 KB
testcase_08 AC 110 ms
56,048 KB
testcase_09 AC 112 ms
55,732 KB
testcase_10 AC 111 ms
55,836 KB
testcase_11 AC 118 ms
55,456 KB
testcase_12 AC 118 ms
56,052 KB
testcase_13 AC 109 ms
55,760 KB
testcase_14 AC 107 ms
56,200 KB
testcase_15 AC 111 ms
55,508 KB
testcase_16 AC 112 ms
55,784 KB
testcase_17 AC 111 ms
55,832 KB
testcase_18 AC 111 ms
55,640 KB
testcase_19 AC 115 ms
55,788 KB
testcase_20 AC 111 ms
55,680 KB
testcase_21 AC 110 ms
56,008 KB
testcase_22 AC 108 ms
55,516 KB
testcase_23 AC 111 ms
55,628 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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