結果

問題 No.85 TVザッピング(1)
ユーザー Pump0129
提出日時 2018-11-28 17:10:06
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 606 bytes
コンパイル時間 2,227 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 41,616 KB
最終ジャッジ日時 2024-06-26 22:58:14
合計ジャッジ時間 6,616 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no85;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int pos_x = scan.nextInt();
        int pos_y = scan.nextInt();

        if ((1 < pos_x && 1 < pos_y) &&
                (pos_x % 2 == 0 || pos_y % 2 == 0)) {
            System.out.println("YES");
        } else {
            if (pos_x == 2 || pos_y == 2) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}
0