結果
問題 | No.208 王将 |
ユーザー |
|
提出日時 | 2015-06-14 20:45:27 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 141 ms / 1,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 3,477 ms |
コンパイル使用メモリ | 74,380 KB |
実行使用メモリ | 54,432 KB |
最終ジャッジ日時 | 2024-10-09 16:25:36 |
合計ジャッジ時間 | 7,928 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import java.util.Scanner; public class Yuki208{ public static void main(String[] arg){ Scanner sc = new Scanner(System.in); int x,y,x1,y1; x = sc.nextInt(); y = sc.nextInt(); x1 = sc.nextInt(); y1 = sc.nextInt(); if(x == y && x1 == y1 && x1 <x){ System.out.println(x+1); }else{ if(x> y){ System.out.println(x); }else{ System.out.println(y); } } } }