結果

問題 No.85 TVザッピング(1)
ユーザー kou6839kou6839
提出日時 2014-12-09 15:05:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 2,381 ms
コンパイル使用メモリ 74,596 KB
実行使用メモリ 41,712 KB
最終ジャッジ日時 2024-04-15 05:09:33
合計ジャッジ時間 6,639 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
41,712 KB
testcase_01 AC 115 ms
40,064 KB
testcase_02 AC 124 ms
41,284 KB
testcase_03 AC 126 ms
41,156 KB
testcase_04 AC 116 ms
40,200 KB
testcase_05 AC 112 ms
40,236 KB
testcase_06 AC 129 ms
41,320 KB
testcase_07 AC 125 ms
41,148 KB
testcase_08 AC 113 ms
40,072 KB
testcase_09 AC 124 ms
41,496 KB
testcase_10 AC 115 ms
40,280 KB
testcase_11 AC 115 ms
39,876 KB
testcase_12 AC 128 ms
41,140 KB
testcase_13 AC 124 ms
41,260 KB
testcase_14 AC 123 ms
41,292 KB
testcase_15 AC 126 ms
40,896 KB
testcase_16 AC 117 ms
39,944 KB
testcase_17 AC 127 ms
41,500 KB
testcase_18 AC 127 ms
41,508 KB
testcase_19 AC 121 ms
41,688 KB
testcase_20 AC 125 ms
41,412 KB
testcase_21 AC 129 ms
41,212 KB
testcase_22 AC 127 ms
41,168 KB
testcase_23 AC 124 ms
41,116 KB
testcase_24 AC 134 ms
41,556 KB
testcase_25 AC 111 ms
39,940 KB
testcase_26 AC 122 ms
41,168 KB
testcase_27 AC 122 ms
41,396 KB
testcase_28 AC 124 ms
41,288 KB
testcase_29 AC 124 ms
41,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int k = sc.nextInt();
        if( (n==1&&m==2) || (m==1&&n==2) ) {
        	System.out.println("YES");
        	return;
        }
        if( (n%2==0 || m%2==0)&&(n>1&&m>1) ){
        	System.out.println("YES");
        	return;
        }
        System.out.println("NO");
    }
}		
0