結果

問題 No.85 TVザッピング(1)
ユーザー bluemeganebluemegane
提出日時 2020-09-12 15:28:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 493 bytes
コンパイル時間 2,041 ms
コンパイル使用メモリ 62,812 KB
実行使用メモリ 22,780 KB
最終ジャッジ日時 2023-08-30 13:07:43
合計ジャッジ時間 4,854 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,572 KB
testcase_01 AC 57 ms
20,636 KB
testcase_02 AC 57 ms
20,636 KB
testcase_03 AC 57 ms
20,752 KB
testcase_04 AC 57 ms
20,704 KB
testcase_05 AC 57 ms
22,668 KB
testcase_06 AC 57 ms
20,604 KB
testcase_07 AC 58 ms
20,544 KB
testcase_08 AC 58 ms
20,640 KB
testcase_09 AC 57 ms
20,748 KB
testcase_10 AC 57 ms
20,576 KB
testcase_11 AC 56 ms
20,536 KB
testcase_12 AC 57 ms
20,656 KB
testcase_13 AC 57 ms
20,536 KB
testcase_14 AC 56 ms
20,616 KB
testcase_15 AC 56 ms
20,596 KB
testcase_16 AC 57 ms
20,604 KB
testcase_17 AC 57 ms
20,780 KB
testcase_18 AC 57 ms
22,688 KB
testcase_19 AC 58 ms
22,644 KB
testcase_20 AC 57 ms
20,860 KB
testcase_21 AC 57 ms
20,540 KB
testcase_22 AC 58 ms
22,652 KB
testcase_23 AC 58 ms
22,664 KB
testcase_24 AC 57 ms
20,696 KB
testcase_25 AC 59 ms
22,780 KB
testcase_26 AC 57 ms
20,800 KB
testcase_27 AC 57 ms
20,604 KB
testcase_28 AC 57 ms
20,644 KB
testcase_29 AC 57 ms
22,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        getAns(n, m);
    }
    static void getAns(int n, int m)
    {
        string ans;
        if (n == 1) ans = m == 2 ? "YES" : "NO";
        else if (m == 1) ans = n == 2 ? "YES" : "NO";
        else ans = n % 2 == 1 && m % 2 == 1 ? "NO" : "YES";
        Console.WriteLine(ans);
    }
}
0