結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2021-05-25 03:19:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 1,879 ms |
| コンパイル使用メモリ | 192,672 KB |
| 最終ジャッジ日時 | 2025-01-21 18:04:41 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
long long int n, a, x;
long long int sum = 0;
cin >> n >> a;
a *= n;
for (int i = 0; i < n; i++)
{
cin >> x;
sum += x;
}
if (sum == a)
{
cout << "YES" << '\n';
}
else
{
cout << "NO" << '\n';
}
return 0;
}