結果

問題 No.85 TVザッピング(1)
ユーザー GrenacheGrenache
提出日時 2015-11-21 18:40:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 652 bytes
コンパイル時間 3,121 ms
コンパイル使用メモリ 74,932 KB
実行使用メモリ 54,364 KB
最終ジャッジ日時 2024-04-15 05:23:23
合計ジャッジ時間 7,958 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
54,144 KB
testcase_01 AC 122 ms
53,852 KB
testcase_02 AC 124 ms
53,868 KB
testcase_03 AC 135 ms
53,952 KB
testcase_04 AC 138 ms
54,264 KB
testcase_05 AC 121 ms
54,036 KB
testcase_06 AC 121 ms
54,016 KB
testcase_07 AC 119 ms
53,932 KB
testcase_08 AC 122 ms
53,896 KB
testcase_09 AC 121 ms
54,216 KB
testcase_10 AC 119 ms
54,000 KB
testcase_11 AC 121 ms
54,064 KB
testcase_12 AC 109 ms
53,076 KB
testcase_13 AC 120 ms
53,852 KB
testcase_14 AC 124 ms
54,156 KB
testcase_15 AC 129 ms
54,092 KB
testcase_16 AC 125 ms
54,100 KB
testcase_17 AC 124 ms
53,984 KB
testcase_18 AC 126 ms
54,324 KB
testcase_19 AC 124 ms
53,812 KB
testcase_20 AC 122 ms
54,184 KB
testcase_21 AC 125 ms
54,120 KB
testcase_22 AC 123 ms
54,364 KB
testcase_23 AC 122 ms
53,916 KB
testcase_24 AC 125 ms
53,912 KB
testcase_25 AC 124 ms
54,232 KB
testcase_26 AC 128 ms
53,980 KB
testcase_27 AC 120 ms
54,032 KB
testcase_28 AC 124 ms
53,948 KB
testcase_29 AC 127 ms
54,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main_yukicoder85 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int h = sc.nextInt();
        int w = sc.nextInt();
        @SuppressWarnings("unused")
		int c = sc.nextInt();

        int b = Math.max(h, w);
        int s = Math.min(h, w);
        if (s == 1 && b > 2) {
        	System.out.println("NO");
        } else if (s == 1 && b <= 2) {
        	System.out.println("YES");
        } else if (s % 2 == 1 && b % 2 == 1) {
        	System.out.println("NO");
        } else {
        	System.out.println("YES");
        }

        sc.close();
    }
}
0