結果

問題 No.85 TVザッピング(1)
ユーザー syokeinin
提出日時 2014-12-05 00:19:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 118 ms / 5,000 ms
コード長 447 bytes
コンパイル時間 2,865 ms
コンパイル使用メモリ 75,136 KB
実行使用メモリ 41,704 KB
最終ジャッジ日時 2024-10-04 17:13:50
合計ジャッジ時間 6,823 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class QQ5 {
	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((m == 1 && n == 2)||(m == 2 && n == 1 )){
			System.out.println("YES");
		}else if(n == 1 || m == 1 || (n % 2 != 0) && (m % 2 != 0)){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}
		sc.close();
	}
}
0