結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2014-12-04 23:50:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 5,000 ms |
コード長 | 529 bytes |
コンパイル時間 | 1,902 ms |
コンパイル使用メモリ | 74,452 KB |
実行使用メモリ | 41,508 KB |
最終ジャッジ日時 | 2024-10-04 17:12:02 |
合計ジャッジ時間 | 6,447 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
package no085;import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int n = sc.nextInt();int m = sc.nextInt();int c = sc.nextInt();System.out.println(solve(n,m,c) ? "YES" : "NO");}public static boolean solve(int n,int m,int c) {int temp;if (n < m) {temp = n;n = m;m = temp;}if ((n*m)%2==1) {return false;}if (m == 1 && n >= 3) {return false;}return true;}}