結果

問題 No.85 TVザッピング(1)
ユーザー atkrymatkrym
提出日時 2016-10-25 22:11:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 619 bytes
コンパイル時間 1,821 ms
コンパイル使用メモリ 74,664 KB
実行使用メモリ 54,632 KB
最終ジャッジ日時 2024-04-15 05:32:04
合計ジャッジ時間 6,144 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
53,992 KB
testcase_01 AC 115 ms
54,092 KB
testcase_02 AC 118 ms
54,096 KB
testcase_03 AC 118 ms
54,220 KB
testcase_04 AC 110 ms
52,724 KB
testcase_05 AC 114 ms
53,888 KB
testcase_06 AC 107 ms
52,760 KB
testcase_07 AC 115 ms
53,724 KB
testcase_08 AC 119 ms
53,912 KB
testcase_09 AC 105 ms
53,080 KB
testcase_10 AC 120 ms
53,976 KB
testcase_11 AC 108 ms
53,880 KB
testcase_12 AC 115 ms
53,928 KB
testcase_13 AC 109 ms
53,844 KB
testcase_14 AC 119 ms
54,072 KB
testcase_15 AC 106 ms
54,632 KB
testcase_16 AC 117 ms
53,144 KB
testcase_17 AC 120 ms
53,868 KB
testcase_18 AC 109 ms
52,924 KB
testcase_19 AC 120 ms
53,960 KB
testcase_20 AC 109 ms
52,924 KB
testcase_21 AC 115 ms
53,980 KB
testcase_22 AC 117 ms
54,280 KB
testcase_23 AC 117 ms
54,128 KB
testcase_24 AC 118 ms
54,232 KB
testcase_25 AC 108 ms
52,932 KB
testcase_26 AC 118 ms
54,252 KB
testcase_27 AC 120 ms
54,032 KB
testcase_28 AC 119 ms
54,004 KB
testcase_29 AC 103 ms
53,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

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 c = sc.nextInt();
        int n = x*y;
        if (x == 1 || y == 1) {
            if (x == 2 || y == 2) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        } else if (n%2!=0) {
            System.out.println("NO");
        } else {
            System.out.println("YES");
        }
    }
}
0