結果

問題 No.208 王将
ユーザー spaciaspacia
提出日時 2016-01-03 15:57:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 603 bytes
コンパイル時間 1,748 ms
コンパイル使用メモリ 74,720 KB
実行使用メモリ 50,424 KB
最終ジャッジ日時 2024-04-17 22:46:28
合計ジャッジ時間 3,713 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
50,312 KB
testcase_01 AC 47 ms
50,332 KB
testcase_02 AC 47 ms
50,272 KB
testcase_03 AC 46 ms
50,324 KB
testcase_04 AC 46 ms
49,924 KB
testcase_05 AC 44 ms
50,320 KB
testcase_06 AC 45 ms
50,424 KB
testcase_07 AC 49 ms
50,064 KB
testcase_08 AC 50 ms
50,324 KB
testcase_09 AC 49 ms
50,300 KB
testcase_10 AC 46 ms
49,924 KB
testcase_11 AC 51 ms
50,376 KB
testcase_12 AC 46 ms
50,268 KB
testcase_13 AC 47 ms
50,060 KB
testcase_14 AC 50 ms
50,272 KB
testcase_15 AC 48 ms
50,228 KB
testcase_16 AC 47 ms
50,304 KB
testcase_17 AC 49 ms
50,140 KB
testcase_18 AC 47 ms
50,128 KB
testcase_19 AC 52 ms
50,320 KB
testcase_20 AC 51 ms
49,940 KB
testcase_21 AC 51 ms
50,296 KB
testcase_22 AC 46 ms
50,384 KB
testcase_23 AC 51 ms
50,120 KB
testcase_24 AC 47 ms
50,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main {
	
	public static void out (Object o) {
		System.out.println(o);
	}
		
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line1 = br.readLine().split(" ");
		String[] line2 = br.readLine().split(" ");
		
		int x = Integer.parseInt(line1[0]);
		int y = Integer.parseInt(line1[1]);
		int x2 = Integer.parseInt(line2[0]);
		int y2 = Integer.parseInt(line2[1]);
		int ans = Math.max(x , y);
		
		out(x == y && x2 == y2 && x2 < x ? ans + 1 : ans);
	}
}
0