結果

問題 No.208 王将
ユーザー k_kadorak_kadora
提出日時 2015-06-14 20:45:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 388 bytes
コンパイル時間 3,537 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 54,444 KB
最終ジャッジ日時 2024-04-17 22:42:38
合計ジャッジ時間 7,123 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
54,048 KB
testcase_01 AC 129 ms
53,948 KB
testcase_02 AC 129 ms
54,004 KB
testcase_03 AC 130 ms
54,056 KB
testcase_04 AC 126 ms
54,220 KB
testcase_05 AC 126 ms
54,136 KB
testcase_06 AC 126 ms
54,292 KB
testcase_07 AC 128 ms
54,136 KB
testcase_08 AC 112 ms
53,148 KB
testcase_09 AC 127 ms
54,108 KB
testcase_10 AC 128 ms
53,828 KB
testcase_11 AC 128 ms
54,112 KB
testcase_12 AC 128 ms
53,848 KB
testcase_13 AC 128 ms
54,260 KB
testcase_14 AC 128 ms
54,444 KB
testcase_15 AC 131 ms
54,092 KB
testcase_16 AC 130 ms
54,396 KB
testcase_17 AC 129 ms
54,112 KB
testcase_18 AC 131 ms
54,108 KB
testcase_19 AC 124 ms
54,336 KB
testcase_20 AC 124 ms
54,420 KB
testcase_21 AC 128 ms
54,112 KB
testcase_22 AC 123 ms
54,100 KB
testcase_23 AC 123 ms
54,296 KB
testcase_24 AC 113 ms
53,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Yuki208{
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		int x,y,x1,y1;
		x = sc.nextInt();
		y = sc.nextInt();
		x1 = sc.nextInt();
		y1 = sc.nextInt();
		if(x == y && x1 == y1 && x1 <x){
			System.out.println(x+1);
		}else{
			if(x> y){
				System.out.println(x);
			}else{
				System.out.println(y);
			}
		}
	}
}
0