結果

問題 No.208 王将
ユーザー Mcpu3Mcpu3
提出日時 2018-09-02 22:34:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 328 bytes
コンパイル時間 1,960 ms
コンパイル使用メモリ 74,636 KB
実行使用メモリ 54,308 KB
最終ジャッジ日時 2024-04-10 12:51:23
合計ジャッジ時間 5,749 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
53,888 KB
testcase_01 AC 109 ms
52,936 KB
testcase_02 AC 123 ms
54,072 KB
testcase_03 AC 110 ms
53,352 KB
testcase_04 AC 106 ms
52,996 KB
testcase_05 AC 111 ms
53,572 KB
testcase_06 AC 106 ms
52,696 KB
testcase_07 AC 117 ms
53,980 KB
testcase_08 AC 108 ms
52,736 KB
testcase_09 AC 113 ms
54,052 KB
testcase_10 AC 119 ms
54,020 KB
testcase_11 AC 113 ms
54,308 KB
testcase_12 AC 111 ms
53,988 KB
testcase_13 AC 109 ms
53,092 KB
testcase_14 AC 118 ms
54,260 KB
testcase_15 AC 121 ms
54,112 KB
testcase_16 AC 122 ms
54,032 KB
testcase_17 AC 125 ms
54,036 KB
testcase_18 AC 122 ms
54,140 KB
testcase_19 AC 121 ms
54,124 KB
testcase_20 AC 124 ms
53,920 KB
testcase_21 AC 107 ms
53,080 KB
testcase_22 AC 116 ms
54,092 KB
testcase_23 AC 103 ms
52,708 KB
testcase_24 AC 113 ms
54,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	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();
		sc.close();
		if(x==y&&x2==y2&&x>x2) System.out.print(x+1);
		else if(x>y) System.out.print(x);
		else System.out.print(y);
	}
}
0