結果

問題 No.166 マス埋めゲーム
ユーザー swdamdrswdamdr
提出日時 2017-02-28 15:50:44
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 676 bytes
コンパイル時間 6,134 ms
コンパイル使用メモリ 105,504 KB
実行使用メモリ 26,036 KB
最終ジャッジ日時 2023-09-02 17:03:43
合計ジャッジ時間 5,431 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
19,816 KB
testcase_01 AC 58 ms
21,756 KB
testcase_02 AC 58 ms
21,848 KB
testcase_03 WA -
testcase_04 AC 59 ms
21,740 KB
testcase_05 WA -
testcase_06 AC 59 ms
22,060 KB
testcase_07 WA -
testcase_08 AC 58 ms
21,852 KB
testcase_09 AC 58 ms
19,992 KB
testcase_10 AC 59 ms
23,732 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 58 ms
19,712 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 58 ms
21,844 KB
testcase_18 WA -
testcase_19 AC 60 ms
23,816 KB
testcase_20 WA -
testcase_21 AC 60 ms
23,736 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;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        long[] ary = Console.ReadLine().Split().Select(long.Parse).ToArray();
        long h = ary[0];
        long w = ary[1];
        long n = ary[2];
        long k = ary[3];
        string ans = "NO";

        long all = h * w;

        if (all - n <= 0)
        {
            if (all == k)
            {
                ans = "YES";
            }
        }
        else
        {
            if (all % n == n - k)
            {
                ans = "YES";
            }
        }

        Console.WriteLine(ans);
        Console.Read();
    }
}
0