結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2015-04-19 11:53:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 161 ms / 5,000 ms |
コード長 | 560 bytes |
コンパイル時間 | 2,559 ms |
コンパイル使用メモリ | 74,968 KB |
実行使用メモリ | 54,532 KB |
最終ジャッジ日時 | 2024-10-04 17:26:59 |
合計ジャッジ時間 | 8,260 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); int n = koko.nextInt(); int m = koko.nextInt(); int c = koko.nextInt(); if(n%2!=0&&m%2!=0){ System.out.println("NO"); }else if(n==1||m==1){ if(n==2||m==2){ System.out.println("YES"); }else{ System.out.println("NO"); } }else{ System.out.println("YES"); } } }