結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
じゃがりこ
|
| 提出日時 | 2018-08-11 18:57:26 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 277 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-23 06:20:59 |
| 合計ジャッジ時間 | 1,010 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <stdio.h>
int main(){
int n, i;
__int64_t a,x,c = 0;
scanf("%d%lld", &n, &a);
for (i = 0; i < n; i++) {
scanf("%lld", &x);
c += x;
}
if (c % n == 0 && c / n == a) {
printf("YES");
}
else {
printf("NO");
}
}
じゃがりこ