結果

問題 No.208 王将
ユーザー tentententen
提出日時 2020-10-07 11:42:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 353 bytes
コンパイル時間 2,131 ms
コンパイル使用メモリ 71,616 KB
実行使用メモリ 56,524 KB
最終ジャッジ日時 2023-09-27 09:11:47
合計ジャッジ時間 5,590 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,912 KB
testcase_01 AC 112 ms
55,472 KB
testcase_02 AC 112 ms
55,640 KB
testcase_03 AC 111 ms
55,880 KB
testcase_04 AC 110 ms
55,668 KB
testcase_05 AC 113 ms
56,000 KB
testcase_06 AC 111 ms
55,696 KB
testcase_07 AC 116 ms
55,788 KB
testcase_08 AC 114 ms
55,508 KB
testcase_09 AC 113 ms
55,600 KB
testcase_10 AC 113 ms
55,732 KB
testcase_11 AC 109 ms
56,524 KB
testcase_12 AC 112 ms
56,052 KB
testcase_13 AC 111 ms
56,024 KB
testcase_14 AC 114 ms
55,884 KB
testcase_15 AC 111 ms
55,788 KB
testcase_16 AC 111 ms
55,828 KB
testcase_17 AC 109 ms
55,828 KB
testcase_18 AC 115 ms
55,876 KB
testcase_19 AC 113 ms
55,904 KB
testcase_20 AC 118 ms
55,876 KB
testcase_21 AC 116 ms
55,504 KB
testcase_22 AC 113 ms
55,456 KB
testcase_23 AC 110 ms
55,460 KB
testcase_24 AC 110 ms
55,784 KB
権限があれば一括ダウンロードができます

ソースコード

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 && x1 < x) {
		    System.out.println(x + 1);
		} else {
		    System.out.println(Math.max(x, y));
		}
	}
}
0