結果

問題 No.476 正しくない平均
ユーザー nao109
提出日時 2021-08-26 22:32:02
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 1,274 ms
コンパイル使用メモリ 157,524 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-18 21:02:11
合計ジャッジ時間 2,290 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a;
    cin >> n >> a;
    long long ch,ans=0;
    for(int i=0; i<n; i++){cin >> ch; ans+=ch;}
    if(ans==n*a) cout << "YES" << endl;
    else cout << "NO" << endl;
}
0