結果

問題 No.85 TVザッピング(1)
ユーザー tsunabittsunabit
提出日時 2020-02-01 15:47:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 416 bytes
コンパイル時間 4,728 ms
コンパイル使用メモリ 74,772 KB
実行使用メモリ 57,740 KB
最終ジャッジ日時 2023-10-19 00:05:47
合計ジャッジ時間 9,320 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,520 KB
testcase_01 AC 134 ms
57,740 KB
testcase_02 AC 133 ms
57,272 KB
testcase_03 AC 133 ms
57,512 KB
testcase_04 AC 133 ms
57,532 KB
testcase_05 AC 133 ms
57,524 KB
testcase_06 AC 135 ms
57,512 KB
testcase_07 AC 133 ms
57,740 KB
testcase_08 AC 132 ms
57,544 KB
testcase_09 AC 133 ms
57,384 KB
testcase_10 AC 134 ms
57,488 KB
testcase_11 AC 135 ms
57,476 KB
testcase_12 AC 134 ms
57,504 KB
testcase_13 AC 133 ms
57,536 KB
testcase_14 AC 133 ms
55,516 KB
testcase_15 AC 135 ms
57,512 KB
testcase_16 AC 134 ms
57,468 KB
testcase_17 AC 134 ms
57,528 KB
testcase_18 AC 139 ms
57,492 KB
testcase_19 AC 134 ms
57,740 KB
testcase_20 AC 134 ms
57,492 KB
testcase_21 AC 133 ms
55,468 KB
testcase_22 AC 132 ms
57,524 KB
testcase_23 AC 136 ms
57,524 KB
testcase_24 AC 132 ms
57,504 KB
testcase_25 AC 133 ms
57,556 KB
testcase_26 AC 134 ms
57,520 KB
testcase_27 AC 132 ms
57,216 KB
testcase_28 AC 136 ms
57,512 KB
testcase_29 AC 131 ms
57,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No85 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int c = sc.nextInt();
		String ans = "NO";
		
		if(n == 1 && m == 2) ans = "YES";
		if(n == 2 && m == 1) ans = "YES";
		if(n * m % 2 == 0 && n != 1 && m != 1) ans = "YES";
		
		System.out.println(ans);
	}
}
0