結果

問題 No.85 TVザッピング(1)
ユーザー nanophoto12nanophoto12
提出日時 2014-12-05 23:07:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,287 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 101,428 KB
実行使用メモリ 23,912 KB
最終ジャッジ日時 2023-09-02 08:57:34
合計ジャッジ時間 5,207 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
23,872 KB
testcase_01 AC 59 ms
23,768 KB
testcase_02 AC 58 ms
23,912 KB
testcase_03 AC 58 ms
21,820 KB
testcase_04 AC 59 ms
21,704 KB
testcase_05 AC 59 ms
23,844 KB
testcase_06 AC 59 ms
21,908 KB
testcase_07 AC 58 ms
21,780 KB
testcase_08 AC 58 ms
21,788 KB
testcase_09 WA -
testcase_10 AC 59 ms
21,804 KB
testcase_11 AC 61 ms
21,720 KB
testcase_12 AC 60 ms
23,796 KB
testcase_13 AC 58 ms
21,804 KB
testcase_14 WA -
testcase_15 AC 58 ms
21,732 KB
testcase_16 AC 58 ms
21,876 KB
testcase_17 AC 58 ms
21,792 KB
testcase_18 AC 58 ms
21,888 KB
testcase_19 AC 58 ms
21,832 KB
testcase_20 AC 58 ms
23,832 KB
testcase_21 AC 59 ms
23,832 KB
testcase_22 AC 58 ms
21,784 KB
testcase_23 AC 59 ms
21,772 KB
testcase_24 AC 58 ms
21,752 KB
testcase_25 AC 59 ms
23,812 KB
testcase_26 AC 58 ms
23,828 KB
testcase_27 AC 59 ms
23,824 KB
testcase_28 AC 58 ms
19,848 KB
testcase_29 AC 58 ms
23,900 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.Linq;

class Program85
{
    public static void Main(string[] args)
    {
        var line = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int n = line[0];
        int m = line[1];
        if (n == 1 || m == 1)
        {
            Console.WriteLine("NO");
            return;
        }
        {
            int x = 1;
            for (int y = 0; y < m; y++)
            {
                if (x == 1)
                {
                    x = n - 1;
                }
                else
                {
                    x = 1;
                }
            }
            if (x == 1)
            {
                Console.WriteLine("YES");
                return;
            }            
        }
        {
            int y = 1;
            for (int x = 0; x < n; x++)
            {
                if (y == 1)
                {
                    y = m - 1;
                }
                else
                {
                    y = 1;
                }
            }
            if (y == 1)
            {
                Console.WriteLine("YES");
                return;
            }                        
        }
        Console.WriteLine("NO");
    }    
}
0