結果
問題 | No.85 TVザッピング(1) |
ユーザー |
![]() |
提出日時 | 2014-12-05 00:02:07 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 658 ms |
コンパイル使用メモリ | 102,100 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 01:43:34 |
合計ジャッジ時間 | 1,579 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
import std.stdio, std.conv, std.math, std.string, std.range, std.array, std.algorithm; void main(){ auto buf = readln().strip().split().map!(to!int)(); immutable N = buf[0]; immutable M = buf[1]; if(N==1 || M==1) { if(N+M==3) { writeln("YES"); } else { writeln("NO"); } } else { if(N%2==0 || M%2==0) { writeln("YES"); } else { writeln("NO"); } } }