結果

問題 No.476 正しくない平均
ユーザー AquaplusAquaplus
提出日時 2017-09-19 23:49:10
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 683 ms
コンパイル使用メモリ 53,876 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 05:49:26
合計ジャッジ時間 1,359 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <iostream>
using namespace std;

int main(void)
{

   int n, a;
   cin >> n >> a;
   int sum = 0;
   int tmp;
   for(int i = 0; i < n; i++)
    {
        cin >> tmp;
        sum += tmp;
    }
    if(a*n == sum)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
   return 0;
}
0