結果
| 問題 | No.476 正しくない平均 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-19 18:20:26 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 37,888 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-06 07:40:46 |
| 合計ジャッジ時間 | 1,383 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <stdio.h>
int main(){
//input
long n,a;
scanf("%ld %ld",&n,&a);
long total = 0;
for (int i = 0;i < n;i++){
long x;
scanf("%ld",&x);
total += x;
}
//output
if (total == a*n){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
}