結果

問題 No.208 王将
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-22 04:15:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 1,000 ms
コード長 383 bytes
コンパイル時間 3,434 ms
コンパイル使用メモリ 74,416 KB
実行使用メモリ 41,780 KB
最終ジャッジ日時 2024-04-20 00:15:07
合計ジャッジ時間 7,822 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
41,348 KB
testcase_01 AC 135 ms
41,236 KB
testcase_02 AC 134 ms
41,616 KB
testcase_03 AC 133 ms
41,200 KB
testcase_04 AC 136 ms
41,780 KB
testcase_05 AC 133 ms
41,332 KB
testcase_06 AC 132 ms
41,228 KB
testcase_07 AC 131 ms
41,448 KB
testcase_08 AC 131 ms
41,324 KB
testcase_09 AC 136 ms
41,684 KB
testcase_10 AC 136 ms
41,240 KB
testcase_11 AC 134 ms
41,324 KB
testcase_12 AC 136 ms
41,248 KB
testcase_13 AC 140 ms
41,588 KB
testcase_14 AC 134 ms
41,240 KB
testcase_15 AC 133 ms
41,396 KB
testcase_16 AC 136 ms
41,232 KB
testcase_17 AC 135 ms
41,616 KB
testcase_18 AC 133 ms
41,480 KB
testcase_19 AC 137 ms
41,240 KB
testcase_20 AC 122 ms
40,064 KB
testcase_21 AC 134 ms
41,108 KB
testcase_22 AC 135 ms
41,480 KB
testcase_23 AC 135 ms
41,240 KB
testcase_24 AC 134 ms
41,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise108{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int ox = sc.nextInt();
    int oy = sc.nextInt();
    int hx = sc.nextInt();
    int hy = sc.nextInt();

    if(ox == oy && hx == hy && ox > hx){
      System.out.println(ox + 1);
    }else{
      System.out.println(Math.max(ox, oy));
    }
  }
}
0