結果

問題 No.208 王将
ユーザー hhgfhn1hhgfhn1
提出日時 2018-10-29 15:35:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,000 ms
コード長 407 bytes
コンパイル時間 2,879 ms
コンパイル使用メモリ 74,232 KB
実行使用メモリ 41,432 KB
最終ジャッジ日時 2024-04-29 22:44:34
合計ジャッジ時間 6,719 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
39,812 KB
testcase_01 AC 126 ms
41,076 KB
testcase_02 AC 116 ms
39,860 KB
testcase_03 AC 141 ms
41,160 KB
testcase_04 AC 123 ms
39,992 KB
testcase_05 AC 129 ms
41,124 KB
testcase_06 AC 128 ms
41,012 KB
testcase_07 AC 131 ms
41,052 KB
testcase_08 AC 127 ms
41,136 KB
testcase_09 AC 130 ms
41,124 KB
testcase_10 AC 130 ms
41,432 KB
testcase_11 AC 127 ms
41,144 KB
testcase_12 AC 129 ms
41,096 KB
testcase_13 AC 128 ms
41,024 KB
testcase_14 AC 129 ms
40,948 KB
testcase_15 AC 127 ms
41,384 KB
testcase_16 AC 126 ms
40,912 KB
testcase_17 AC 117 ms
39,856 KB
testcase_18 AC 128 ms
41,256 KB
testcase_19 AC 130 ms
41,292 KB
testcase_20 AC 129 ms
40,844 KB
testcase_21 AC 129 ms
41,148 KB
testcase_22 AC 126 ms
41,156 KB
testcase_23 AC 128 ms
41,068 KB
testcase_24 AC 120 ms
39,912 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