結果
| 問題 | No.85 TVザッピング(1) |
| コンテスト | |
| ユーザー |
atkrym
|
| 提出日時 | 2016-10-25 22:11:23 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 5,000 ms |
| コード長 | 619 bytes |
| 記録 | |
| コンパイル時間 | 1,477 ms |
| コンパイル使用メモリ | 82,388 KB |
| 実行使用メモリ | 41,728 KB |
| 最終ジャッジ日時 | 2026-04-20 12:08:08 |
| 合計ジャッジ時間 | 4,082 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
import java.util.*;
import java.math.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws Exception {
int x = sc.nextInt();
int y = sc.nextInt();
int c = sc.nextInt();
int n = x*y;
if (x == 1 || y == 1) {
if (x == 2 || y == 2) {
System.out.println("YES");
} else {
System.out.println("NO");
}
} else if (n%2!=0) {
System.out.println("NO");
} else {
System.out.println("YES");
}
}
}
atkrym