結果

問題 No.85 TVザッピング(1)
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-29 04:45:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 3,034 ms
コンパイル使用メモリ 74,676 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2024-04-15 05:30:28
合計ジャッジ時間 7,352 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
54,020 KB
testcase_01 AC 108 ms
52,884 KB
testcase_02 AC 118 ms
54,180 KB
testcase_03 AC 120 ms
54,076 KB
testcase_04 AC 104 ms
52,964 KB
testcase_05 AC 103 ms
52,944 KB
testcase_06 AC 104 ms
53,056 KB
testcase_07 AC 120 ms
56,084 KB
testcase_08 AC 104 ms
52,832 KB
testcase_09 AC 115 ms
52,800 KB
testcase_10 AC 118 ms
54,076 KB
testcase_11 AC 107 ms
53,052 KB
testcase_12 AC 103 ms
52,636 KB
testcase_13 AC 118 ms
54,168 KB
testcase_14 AC 119 ms
54,128 KB
testcase_15 AC 107 ms
54,304 KB
testcase_16 AC 119 ms
54,140 KB
testcase_17 AC 107 ms
52,736 KB
testcase_18 AC 110 ms
52,912 KB
testcase_19 AC 118 ms
54,144 KB
testcase_20 AC 120 ms
53,976 KB
testcase_21 AC 117 ms
54,112 KB
testcase_22 AC 118 ms
53,980 KB
testcase_23 AC 107 ms
53,036 KB
testcase_24 AC 116 ms
53,968 KB
testcase_25 AC 121 ms
54,024 KB
testcase_26 AC 106 ms
53,052 KB
testcase_27 AC 120 ms
53,980 KB
testcase_28 AC 112 ms
53,548 KB
testcase_29 AC 106 ms
52,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise138{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int m = sc.nextInt();
    int c = sc.nextInt();

    if(n == 1 && m > 2){
      System.out.println("NO");
    }else if(m == 1 && n > 2){
      System.out.println("NO");
    }else if(n % 2 == 1 && m % 2 == 1){
      System.out.println("NO");
    }else{
      System.out.println("YES");
    }
  }
}
0