結果

問題 No.1586 Equal Array
ユーザー atjh16
提出日時 2021-09-23 21:26:23
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 47 ms / 1,000 ms
コード長 229 bytes
コンパイル時間 2,024 ms
コンパイル使用メモリ 191,024 KB
最終ジャッジ日時 2025-01-24 16:21:02
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int n;
long long a, s = 0;

int main()
{
	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a;
		s += a;
	}

	if(s % n == 0)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
0