結果

問題 No.476 正しくない平均
ユーザー norioc
提出日時 2017-08-10 17:51:16
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 660 ms
コンパイル使用メモリ 103,384 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 21:24:51
合計ジャッジ時間 1,689 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 17 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.stdio;
import std.string;

int readint() {
    return readln.chomp.to!int;
}

int[] readints() {
    return readln.split.map!(to!int).array;
}

void main() {
    auto na = readints();
    int a = na[1];
    auto xs = readints();

    if (xs.sum / xs.length == a) {
        writeln("YES");
    }
    else {
        writeln("NO");
    }
}
0