結果

問題 No.476 正しくない平均
ユーザー 14番14番
提出日時 2017-01-28 02:55:15
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 1,257 bytes
コンパイル時間 3,672 ms
コンパイル使用メモリ 104,960 KB
実行使用メモリ 24,148 KB
最終ジャッジ日時 2023-08-25 22:36:46
合計ジャッジ時間 4,974 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
24,120 KB
testcase_01 AC 62 ms
20,080 KB
testcase_02 AC 62 ms
22,096 KB
testcase_03 AC 61 ms
21,956 KB
testcase_04 AC 62 ms
22,016 KB
testcase_05 AC 60 ms
24,004 KB
testcase_06 AC 59 ms
24,148 KB
testcase_07 AC 57 ms
24,056 KB
testcase_08 AC 59 ms
20,084 KB
testcase_09 AC 60 ms
21,980 KB
testcase_10 AC 62 ms
22,092 KB
testcase_11 AC 61 ms
22,036 KB
testcase_12 AC 60 ms
22,104 KB
testcase_13 AC 62 ms
19,988 KB
testcase_14 AC 60 ms
22,112 KB
testcase_15 AC 62 ms
22,032 KB
testcase_16 AC 63 ms
24,104 KB
testcase_17 AC 62 ms
22,008 KB
testcase_18 AC 62 ms
22,212 KB
testcase_19 AC 59 ms
22,120 KB
testcase_20 AC 64 ms
22,028 KB
testcase_21 AC 63 ms
22,108 KB
testcase_22 AC 63 ms
22,012 KB
testcase_23 AC 62 ms
24,148 KB
testcase_24 AC 62 ms
22,100 KB
testcase_25 AC 60 ms
22,112 KB
testcase_26 AC 60 ms
22,100 KB
testcase_27 AC 61 ms
24,064 KB
testcase_28 AC 62 ms
22,100 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;
using System.Text.RegularExpressions;
using System.Text;
 
public class Program
{
    public void Proc() {
        Reader.IsDebug = false;
        long[] inpt = Reader.ReadLine().Split(' ').Select(a=>long.Parse(a)).ToArray();
        int itemCount = (int)inpt[0];
        decimal heikin = (decimal)inpt[1];

        decimal[] items = Reader.ReadLine().Split(' ').Select(a=>decimal.Parse(a)).ToArray();
        if(heikin == items.Average()) {
            Console.WriteLine("YES");
        } else {
            Console.WriteLine("NO");
        }
    }






    public class Reader {
        public static bool IsDebug = true;
        private static System.IO.StringReader SReader;
        private static string InitText = @"


3 5
4 5 6


";
        public static string ReadLine() {
            if(IsDebug) {
                if(SReader == null) {
                    SReader = new System.IO.StringReader(InitText.Trim());
                }
                return SReader.ReadLine();
            } else {
                return Console.ReadLine();
            }
        }
    }
    public static void Main(string[] args)
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0