結果

問題 No.85 TVザッピング(1)
ユーザー qazqaz
提出日時 2017-05-20 17:28:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 568 bytes
コンパイル時間 2,576 ms
コンパイル使用メモリ 107,808 KB
実行使用メモリ 26,064 KB
最終ジャッジ日時 2024-04-15 05:37:35
合計ジャッジ時間 2,485 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
23,904 KB
testcase_01 AC 24 ms
23,860 KB
testcase_02 AC 25 ms
24,116 KB
testcase_03 AC 25 ms
25,816 KB
testcase_04 AC 25 ms
26,064 KB
testcase_05 AC 25 ms
25,868 KB
testcase_06 AC 25 ms
23,900 KB
testcase_07 AC 25 ms
23,812 KB
testcase_08 AC 24 ms
24,240 KB
testcase_09 AC 25 ms
23,772 KB
testcase_10 AC 24 ms
23,776 KB
testcase_11 AC 25 ms
23,900 KB
testcase_12 AC 26 ms
25,856 KB
testcase_13 AC 25 ms
25,860 KB
testcase_14 AC 25 ms
24,032 KB
testcase_15 AC 24 ms
23,776 KB
testcase_16 AC 25 ms
23,900 KB
testcase_17 AC 26 ms
23,856 KB
testcase_18 AC 25 ms
23,900 KB
testcase_19 AC 26 ms
25,860 KB
testcase_20 AC 24 ms
23,648 KB
testcase_21 AC 25 ms
24,036 KB
testcase_22 AC 27 ms
26,000 KB
testcase_23 AC 25 ms
23,776 KB
testcase_24 AC 25 ms
23,940 KB
testcase_25 AC 25 ms
24,068 KB
testcase_26 AC 25 ms
25,992 KB
testcase_27 AC 25 ms
23,852 KB
testcase_28 AC 25 ms
23,684 KB
testcase_29 AC 24 ms
21,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

public class Program
{
    public static void Main() {
        string[] d = Console.ReadLine().Split(' ');
        int N = int.Parse(d[0]);
        int M = int.Parse(d[1]);

        string re = "";
        if (N == 1 || M == 1) {
            if (N == 2 || M == 2) {
                re = "YES";
            }
            else {
                re = "NO";
            }

        }
        else {
            re = N % 2 == 1 && M % 2 == 1 ? "NO" : "YES";
        }
        Console.WriteLine(re);
    }
}
0