結果
問題 |
No.208 王将
|
ユーザー |
|
提出日時 | 2018-09-02 22:34:36 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 134 ms / 1,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 2,382 ms |
コンパイル使用メモリ | 74,608 KB |
実行使用メモリ | 54,380 KB |
最終ジャッジ日時 | 2024-10-02 14:53:29 |
合計ジャッジ時間 | 6,471 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(),y=sc.nextInt(),x2=sc.nextInt(),y2=sc.nextInt(); sc.close(); if(x==y&&x2==y2&&x>x2) System.out.print(x+1); else if(x>y) System.out.print(x); else System.out.print(y); } }