結果

問題 No.85 TVザッピング(1)
ユーザー Pump0129Pump0129
提出日時 2018-11-28 17:10:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 606 bytes
コンパイル時間 1,918 ms
コンパイル使用メモリ 71,092 KB
実行使用メモリ 56,056 KB
最終ジャッジ日時 2023-09-09 05:49:30
合計ジャッジ時間 6,878 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,584 KB
testcase_01 AC 122 ms
55,668 KB
testcase_02 AC 124 ms
55,376 KB
testcase_03 AC 124 ms
55,564 KB
testcase_04 AC 124 ms
55,844 KB
testcase_05 AC 124 ms
55,736 KB
testcase_06 AC 124 ms
54,040 KB
testcase_07 AC 123 ms
55,284 KB
testcase_08 AC 121 ms
55,756 KB
testcase_09 AC 123 ms
55,844 KB
testcase_10 AC 120 ms
55,228 KB
testcase_11 AC 121 ms
55,908 KB
testcase_12 AC 123 ms
55,540 KB
testcase_13 AC 120 ms
55,600 KB
testcase_14 AC 120 ms
55,668 KB
testcase_15 AC 120 ms
55,552 KB
testcase_16 AC 119 ms
55,708 KB
testcase_17 AC 119 ms
55,540 KB
testcase_18 AC 121 ms
55,884 KB
testcase_19 AC 122 ms
55,600 KB
testcase_20 AC 121 ms
55,796 KB
testcase_21 AC 127 ms
55,476 KB
testcase_22 AC 122 ms
56,036 KB
testcase_23 AC 121 ms
56,056 KB
testcase_24 AC 119 ms
55,228 KB
testcase_25 AC 121 ms
55,888 KB
testcase_26 AC 122 ms
55,528 KB
testcase_27 AC 120 ms
55,540 KB
testcase_28 AC 127 ms
55,676 KB
testcase_29 AC 118 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

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