結果

問題 No.85 TVザッピング(1)
ユーザー syokeininsyokeinin
提出日時 2014-12-05 00:19:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 447 bytes
コンパイル時間 3,648 ms
コンパイル使用メモリ 74,696 KB
実行使用メモリ 41,736 KB
最終ジャッジ日時 2024-04-15 05:09:14
合計ジャッジ時間 7,254 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
41,324 KB
testcase_01 AC 117 ms
41,480 KB
testcase_02 AC 116 ms
41,336 KB
testcase_03 AC 121 ms
41,348 KB
testcase_04 AC 119 ms
41,312 KB
testcase_05 AC 114 ms
41,232 KB
testcase_06 AC 116 ms
41,188 KB
testcase_07 AC 120 ms
41,600 KB
testcase_08 AC 107 ms
40,124 KB
testcase_09 AC 105 ms
39,932 KB
testcase_10 AC 102 ms
39,936 KB
testcase_11 AC 117 ms
41,336 KB
testcase_12 AC 120 ms
41,452 KB
testcase_13 AC 119 ms
41,532 KB
testcase_14 AC 108 ms
40,300 KB
testcase_15 AC 117 ms
41,200 KB
testcase_16 AC 109 ms
40,404 KB
testcase_17 AC 108 ms
40,312 KB
testcase_18 AC 117 ms
41,272 KB
testcase_19 AC 119 ms
41,088 KB
testcase_20 AC 115 ms
41,484 KB
testcase_21 AC 117 ms
41,260 KB
testcase_22 AC 121 ms
41,736 KB
testcase_23 AC 117 ms
41,260 KB
testcase_24 AC 119 ms
41,384 KB
testcase_25 AC 116 ms
41,092 KB
testcase_26 AC 120 ms
41,340 KB
testcase_27 AC 116 ms
41,184 KB
testcase_28 AC 117 ms
41,576 KB
testcase_29 AC 122 ms
41,204 KB
権限があれば一括ダウンロードができます

ソースコード

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