結果

問題 No.208 王将
ユーザー rf141rf141
提出日時 2015-08-13 00:56:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 386 bytes
コンパイル時間 3,134 ms
コンパイル使用メモリ 74,376 KB
実行使用メモリ 41,800 KB
最終ジャッジ日時 2024-04-17 22:44:08
合計ジャッジ時間 6,990 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,772 KB
testcase_01 AC 112 ms
41,504 KB
testcase_02 AC 127 ms
41,792 KB
testcase_03 AC 114 ms
41,092 KB
testcase_04 AC 131 ms
41,676 KB
testcase_05 AC 126 ms
41,272 KB
testcase_06 AC 124 ms
41,552 KB
testcase_07 AC 126 ms
41,464 KB
testcase_08 AC 126 ms
41,060 KB
testcase_09 AC 115 ms
41,692 KB
testcase_10 AC 124 ms
41,204 KB
testcase_11 AC 125 ms
41,448 KB
testcase_12 AC 126 ms
41,392 KB
testcase_13 AC 123 ms
41,156 KB
testcase_14 AC 123 ms
41,572 KB
testcase_15 AC 123 ms
41,236 KB
testcase_16 AC 124 ms
41,500 KB
testcase_17 AC 126 ms
41,800 KB
testcase_18 AC 124 ms
41,468 KB
testcase_19 AC 130 ms
41,392 KB
testcase_20 AC 121 ms
41,400 KB
testcase_21 AC 120 ms
41,076 KB
testcase_22 AC 117 ms
41,232 KB
testcase_23 AC 121 ms
41,392 KB
testcase_24 AC 115 ms
41,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Osho{
	public static void main(String... args){
		Scanner scan = new Scanner(System.in);
		int x=scan.nextInt(),y=scan.nextInt(),x1=scan.nextInt(),y1=scan.nextInt();
		System.out.println(count(x,y,x1,y1));
	}
	public static int count(int x,int y,int x1,int y1){
		int res = Math.max(x,y);
		if(x==y && x1==y1 && x1 < x){
			res++;
		}
		return res;
	}
}
0