結果
| 問題 |
No.208 王将
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-02 12:20:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 400 bytes |
| コンパイル時間 | 2,705 ms |
| コンパイル使用メモリ | 75,440 KB |
| 実行使用メモリ | 53,720 KB |
| 最終ジャッジ日時 | 2024-07-07 23:58:52 |
| 合計ジャッジ時間 | 6,311 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 WA * 2 |
ソースコード
import java.util.Scanner;
public class Ousho {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int x = s.nextInt(),y = s.nextInt(),x2 = s.nextInt(),y2 = s.nextInt();
s.close();
int count = 0;
if(x == y){
if(x2 == y2){
count = x+1;
}else{
count = x;
}
}else{
count = Math.min(x, y) + Math.abs(x-y);
}
System.out.println(count);
}
}