結果

問題 No.85 TVザッピング(1)
ユーザー 学ぶマン
提出日時 2025-09-25 09:36:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 82,512 KB
実行使用メモリ 53,708 KB
最終ジャッジ日時 2025-09-25 09:36:58
合計ジャッジ時間 2,880 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, C = map(int, input().split())

# 1*2 の場合はOK
# それ以外で 1 が絡むとダメ
if N*M == 2:
    exit(print('YES'))

if N == 1 or M == 1:
    exit(print('NO'))

#N, M いずれか偶数ならOK
if (N*M)%2 == 0:
    print('YES')
else:
    print('NO')
    
0