結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
monburan_0401
|
| 提出日時 | 2018-09-13 01:52:36 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 761 ms |
| コンパイル使用メモリ | 28,032 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 11:58:02 |
| 合計ジャッジ時間 | 1,693 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include <stdio.h>
int main(void){
int n;
int a;
int x;
long sum = 0;
double ave;
scanf("%d %d",&n,&a);
for(int i = 0; i < n; i++){
scanf("%d",&x);
sum += x;
}
ave = (double)sum / n;
if(ave == a){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
}
monburan_0401