結果

問題 No.208 王将
ユーザー koheiarai94koheiarai94
提出日時 2017-09-25 01:46:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,000 ms
コード長 450 bytes
コンパイル時間 2,601 ms
コンパイル使用メモリ 74,176 KB
実行使用メモリ 41,648 KB
最終ジャッジ日時 2024-04-26 17:55:21
合計ジャッジ時間 7,057 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
41,388 KB
testcase_01 AC 135 ms
41,476 KB
testcase_02 AC 139 ms
41,324 KB
testcase_03 AC 138 ms
41,472 KB
testcase_04 AC 134 ms
41,256 KB
testcase_05 AC 136 ms
41,340 KB
testcase_06 AC 135 ms
41,320 KB
testcase_07 AC 134 ms
41,316 KB
testcase_08 AC 135 ms
41,188 KB
testcase_09 AC 139 ms
41,184 KB
testcase_10 AC 139 ms
41,012 KB
testcase_11 AC 141 ms
41,648 KB
testcase_12 AC 137 ms
41,144 KB
testcase_13 AC 135 ms
41,356 KB
testcase_14 AC 136 ms
41,248 KB
testcase_15 AC 136 ms
41,356 KB
testcase_16 AC 131 ms
41,088 KB
testcase_17 AC 135 ms
41,020 KB
testcase_18 AC 140 ms
41,388 KB
testcase_19 AC 135 ms
41,252 KB
testcase_20 AC 119 ms
40,432 KB
testcase_21 AC 137 ms
41,276 KB
testcase_22 AC 133 ms
41,420 KB
testcase_23 AC 134 ms
41,196 KB
testcase_24 AC 138 ms
41,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

// Yuki 208
// https://yukicoder.me/problems/no/208

public class Main {
	
	public static void main (String[] args) throws InterruptedException {
		Scanner in = new Scanner(System.in);
		
		long x = in.nextLong();
		long y = in.nextLong();
		long x1 = in.nextLong();
		long y1 = in.nextLong();
		
		long answer = Math.max(x, y);
		if (x1 < x && y1 < y && x == y && x1 == y1) {
			answer++;
		}
		System.out.println(answer);
	}
}
0