結果

問題 No.85 TVザッピング(1)
ユーザー kenji_shioya
提出日時 2016-06-29 04:45:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 3,026 ms
コンパイル使用メモリ 74,544 KB
実行使用メモリ 54,668 KB
最終ジャッジ日時 2024-10-04 17:59:40
合計ジャッジ時間 7,517 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

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