結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
atkrym
|
| 提出日時 | 2016-10-25 22:11:23 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 5,000 ms |
| コード長 | 619 bytes |
| コンパイル時間 | 2,226 ms |
| コンパイル使用メモリ | 74,524 KB |
| 実行使用メモリ | 41,456 KB |
| 最終ジャッジ日時 | 2024-10-04 18:03:45 |
| 合計ジャッジ時間 | 6,522 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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