結果

問題 No.208 王将
ユーザー tsunabittsunabit
提出日時 2020-03-15 21:55:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 1,000 ms
コード長 344 bytes
コンパイル時間 3,315 ms
コンパイル使用メモリ 72,416 KB
実行使用メモリ 57,672 KB
最終ジャッジ日時 2023-08-17 04:44:00
合計ジャッジ時間 7,663 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,684 KB
testcase_01 AC 125 ms
55,644 KB
testcase_02 AC 123 ms
55,736 KB
testcase_03 AC 124 ms
55,832 KB
testcase_04 AC 122 ms
55,792 KB
testcase_05 AC 124 ms
55,688 KB
testcase_06 AC 127 ms
56,144 KB
testcase_07 AC 127 ms
55,904 KB
testcase_08 AC 122 ms
55,936 KB
testcase_09 AC 121 ms
55,888 KB
testcase_10 AC 125 ms
56,100 KB
testcase_11 AC 125 ms
55,680 KB
testcase_12 AC 125 ms
55,800 KB
testcase_13 AC 128 ms
55,620 KB
testcase_14 AC 128 ms
55,596 KB
testcase_15 AC 130 ms
55,800 KB
testcase_16 AC 128 ms
56,000 KB
testcase_17 AC 127 ms
55,572 KB
testcase_18 AC 130 ms
54,220 KB
testcase_19 AC 126 ms
55,324 KB
testcase_20 AC 128 ms
55,428 KB
testcase_21 AC 127 ms
55,796 KB
testcase_22 AC 126 ms
55,680 KB
testcase_23 AC 128 ms
57,672 KB
testcase_24 AC 126 ms
56,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

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