結果
問題 | No.476 正しくない平均 |
ユーザー | himo |
提出日時 | 2019-09-26 18:53:53 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 1,199 ms |
コンパイル使用メモリ | 159,184 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 08:05:31 |
合計ジャッジ時間 | 2,096 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main(){ int n; double a; cin >> n >>a; double che =0; for(int i=0;i<n;i++){ double z; cin>>z; che+=z; } che/=n; if(a==che){ cout <<"YES"<<endl; } else { cout <<"NO"<<endl; } }