結果

問題 No.85 TVザッピング(1)
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-19 11:53:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 144 ms / 5,000 ms
コード長 560 bytes
コンパイル時間 2,290 ms
コンパイル使用メモリ 74,360 KB
実行使用メモリ 54,524 KB
最終ジャッジ日時 2024-04-15 05:14:51
合計ジャッジ時間 7,273 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
54,228 KB
testcase_01 AC 138 ms
54,304 KB
testcase_02 AC 141 ms
54,240 KB
testcase_03 AC 144 ms
53,888 KB
testcase_04 AC 138 ms
54,028 KB
testcase_05 AC 141 ms
54,444 KB
testcase_06 AC 137 ms
54,008 KB
testcase_07 AC 135 ms
54,200 KB
testcase_08 AC 140 ms
54,524 KB
testcase_09 AC 140 ms
53,884 KB
testcase_10 AC 136 ms
54,244 KB
testcase_11 AC 136 ms
54,236 KB
testcase_12 AC 140 ms
54,032 KB
testcase_13 AC 139 ms
54,096 KB
testcase_14 AC 140 ms
54,176 KB
testcase_15 AC 142 ms
53,780 KB
testcase_16 AC 136 ms
54,232 KB
testcase_17 AC 139 ms
54,004 KB
testcase_18 AC 138 ms
54,048 KB
testcase_19 AC 137 ms
54,164 KB
testcase_20 AC 141 ms
54,216 KB
testcase_21 AC 139 ms
54,120 KB
testcase_22 AC 140 ms
54,276 KB
testcase_23 AC 138 ms
54,480 KB
testcase_24 AC 138 ms
53,880 KB
testcase_25 AC 137 ms
54,328 KB
testcase_26 AC 137 ms
53,980 KB
testcase_27 AC 137 ms
54,040 KB
testcase_28 AC 136 ms
53,984 KB
testcase_29 AC 135 ms
54,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        int n = koko.nextInt();
        int m = koko.nextInt();
        int c = koko.nextInt();
        if(n%2!=0&&m%2!=0){
            System.out.println("NO");
        }else if(n==1||m==1){
            if(n==2||m==2){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }else{
            System.out.println("YES");
        }
    }
}
0