結果
問題 | No.208 王将 |
ユーザー |
![]() |
提出日時 | 2016-10-23 18:18:11 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 163 ms / 1,000 ms |
コード長 | 637 bytes |
コンパイル時間 | 3,738 ms |
コンパイル使用メモリ | 74,740 KB |
実行使用メモリ | 41,628 KB |
最終ジャッジ日時 | 2024-11-24 02:01:52 |
合計ジャッジ時間 | 6,638 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import java.util.*;import java.math.*;import java.text.*;public class Main {private static Scanner sc = new Scanner(System.in);public static void main(String[] args) throws Exception {int x = sc.nextInt();int y = sc.nextInt();int x1 = sc.nextInt();int y1 = sc.nextInt();if (x > y) {System.out.println(x);} else if (y > x) {System.out.println(y);} else {if (x1 == y1 && x1 < x) {System.out.println(x+1);} else {System.out.println(x);}}}}