結果

問題 No.208 王将
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-12-02 18:41:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 387 bytes
コンパイル時間 1,955 ms
コンパイル使用メモリ 71,180 KB
実行使用メモリ 56,300 KB
最終ジャッジ日時 2023-08-18 12:22:28
合計ジャッジ時間 6,426 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
55,840 KB
testcase_01 AC 115 ms
55,900 KB
testcase_02 AC 113 ms
55,632 KB
testcase_03 AC 108 ms
55,904 KB
testcase_04 AC 110 ms
55,752 KB
testcase_05 AC 108 ms
55,644 KB
testcase_06 AC 118 ms
53,660 KB
testcase_07 AC 117 ms
55,552 KB
testcase_08 AC 114 ms
55,392 KB
testcase_09 AC 115 ms
56,212 KB
testcase_10 AC 113 ms
55,848 KB
testcase_11 AC 113 ms
55,656 KB
testcase_12 AC 116 ms
55,968 KB
testcase_13 AC 116 ms
55,824 KB
testcase_14 AC 109 ms
56,052 KB
testcase_15 AC 110 ms
54,016 KB
testcase_16 AC 112 ms
55,804 KB
testcase_17 AC 115 ms
55,756 KB
testcase_18 AC 112 ms
55,984 KB
testcase_19 AC 113 ms
56,300 KB
testcase_20 AC 118 ms
55,376 KB
testcase_21 AC 116 ms
56,284 KB
testcase_22 AC 112 ms
55,840 KB
testcase_23 AC 111 ms
55,532 KB
testcase_24 AC 116 ms
55,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int ans = Math.max(x,y);
        if(x==y&&x2==y2&&x>x2){
            ans++;
        }
        System.out.println(ans);
    }
}
0