結果

問題 No.208 王将
ユーザー rf141
提出日時 2015-08-13 00:56:26
言語 Java
(openjdk 23)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 386 bytes
コンパイル時間 3,540 ms
コンパイル使用メモリ 77,760 KB
実行使用メモリ 41,508 KB
最終ジャッジ日時 2024-10-09 16:26:58
合計ジャッジ時間 7,515 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

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