結果
| 問題 | 
                            No.208 王将
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kohaku_kohaku
                         | 
                    
| 提出日時 | 2016-12-02 18:41:23 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 127 ms / 1,000 ms | 
| コード長 | 387 bytes | 
| コンパイル時間 | 2,070 ms | 
| コンパイル使用メモリ | 74,444 KB | 
| 実行使用メモリ | 41,324 KB | 
| 最終ジャッジ日時 | 2024-11-27 17:22:53 | 
| 合計ジャッジ時間 | 6,140 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 23 | 
ソースコード
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);
    }
}
            
            
            
        
            
kohaku_kohaku