結果

問題 No.85 TVザッピング(1)
ユーザー spaciaspacia
提出日時 2016-01-20 14:56:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 585 bytes
コンパイル時間 2,450 ms
コンパイル使用メモリ 75,668 KB
実行使用メモリ 37,236 KB
最終ジャッジ日時 2024-04-15 05:24:35
合計ジャッジ時間 4,140 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
37,160 KB
testcase_01 AC 48 ms
37,080 KB
testcase_02 AC 48 ms
36,856 KB
testcase_03 AC 48 ms
36,916 KB
testcase_04 AC 48 ms
36,820 KB
testcase_05 AC 50 ms
37,112 KB
testcase_06 AC 48 ms
36,916 KB
testcase_07 AC 49 ms
37,076 KB
testcase_08 AC 49 ms
36,928 KB
testcase_09 AC 47 ms
36,988 KB
testcase_10 AC 47 ms
36,748 KB
testcase_11 AC 47 ms
36,676 KB
testcase_12 AC 47 ms
37,036 KB
testcase_13 AC 47 ms
36,752 KB
testcase_14 AC 49 ms
37,064 KB
testcase_15 AC 49 ms
36,716 KB
testcase_16 AC 48 ms
36,864 KB
testcase_17 AC 53 ms
36,624 KB
testcase_18 AC 48 ms
37,112 KB
testcase_19 AC 48 ms
37,036 KB
testcase_20 AC 47 ms
36,964 KB
testcase_21 AC 48 ms
37,212 KB
testcase_22 AC 48 ms
37,208 KB
testcase_23 AC 48 ms
36,900 KB
testcase_24 AC 48 ms
37,020 KB
testcase_25 AC 48 ms
36,880 KB
testcase_26 AC 48 ms
36,916 KB
testcase_27 AC 48 ms
37,236 KB
testcase_28 AC 48 ms
37,128 KB
testcase_29 AC 48 ms
36,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main {
	
	public static void out (Object o) {
		System.out.println(o);
	}
	
	public static boolean solve (int n , int m) {
		if (n == 1 || m == 1) return n == 2 || m == 2;
		return n % 2 == 0 || m % 2 == 0;
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		String[] line = br.readLine().split(" ");
		
		int n = Integer.parseInt(line[0]);
		int m = Integer.parseInt(line[1]);
		
		out(solve(n ,m) ? "YES" : "NO");
	}
}
0