結果

問題 No.1250 汝は倍数なりや?
ユーザー 1644吉田英陽1644吉田英陽
提出日時 2020-11-02 22:12:22
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,049 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 101,976 KB
実行使用メモリ 42,396 KB
最終ジャッジ日時 2023-09-29 13:52:32
合計ジャッジ時間 9,354 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
22,752 KB
testcase_01 AC 56 ms
20,676 KB
testcase_02 AC 55 ms
20,604 KB
testcase_03 AC 56 ms
20,768 KB
testcase_04 AC 55 ms
20,608 KB
testcase_05 AC 54 ms
20,692 KB
testcase_06 AC 56 ms
22,708 KB
testcase_07 AC 55 ms
20,748 KB
testcase_08 AC 56 ms
22,736 KB
testcase_09 AC 56 ms
20,748 KB
testcase_10 AC 55 ms
20,776 KB
testcase_11 WA -
testcase_12 AC 55 ms
18,788 KB
testcase_13 AC 55 ms
20,604 KB
testcase_14 AC 55 ms
20,660 KB
testcase_15 AC 55 ms
20,688 KB
testcase_16 AC 56 ms
20,728 KB
testcase_17 AC 56 ms
20,832 KB
testcase_18 AC 56 ms
20,748 KB
testcase_19 AC 55 ms
22,736 KB
testcase_20 AC 56 ms
20,848 KB
testcase_21 AC 55 ms
20,664 KB
testcase_22 AC 56 ms
22,744 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 63 ms
20,752 KB
testcase_27 WA -
testcase_28 AC 64 ms
22,812 KB
testcase_29 WA -
testcase_30 AC 64 ms
20,796 KB
testcase_31 AC 63 ms
20,808 KB
testcase_32 AC 66 ms
22,840 KB
testcase_33 WA -
testcase_34 AC 107 ms
28,296 KB
testcase_35 AC 135 ms
40,816 KB
testcase_36 AC 136 ms
37,264 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 102 ms
28,340 KB
testcase_40 AC 109 ms
34,672 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 138 ms
41,500 KB
testcase_46 WA -
testcase_47 AC 114 ms
37,268 KB
testcase_48 AC 55 ms
20,740 KB
testcase_49 AC 55 ms
20,656 KB
testcase_50 AC 56 ms
22,668 KB
testcase_51 AC 56 ms
20,692 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;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp84
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int n = int.Parse(str[0]);
            int h = int.Parse(str[1]);
            int kakewa = 1;
            int[] a = new int[n];
            string[] str2 = Console.ReadLine().Split();
            for(int i = 0; i < n; i++)
            {
                a[i] = int.Parse(str2[i]);
            }
            for(int i = 0; i < n; i++)
            {
                kakewa = kakewa * a[i];
            }
            if (kakewa < 0)
            {
                kakewa *= -1;
            }
            if (kakewa % h == 0)
            {
                Console.WriteLine("YES");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("NO");
                Console.ReadLine();
            }
        }
    }
}
0