結果
| 問題 | No.208 王将 |
| コンテスト | |
| ユーザー |
atkrym
|
| 提出日時 | 2016-10-23 18:18:11 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 57 ms / 1,000 ms |
| + 69µs | |
| コード長 | 637 bytes |
| 記録 | |
| コンパイル時間 | 1,529 ms |
| コンパイル使用メモリ | 85,988 KB |
| 実行使用メモリ | 45,352 KB |
| 最終ジャッジ日時 | 2026-09-28 22:46:07 |
| 合計ジャッジ時間 | 4,812 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}
}
}
}
atkrym