結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2018-05-06 11:34:52 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 02:06:09 |
合計ジャッジ時間 | 1,086 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 1 |
ソースコード
#include <stdio.h> int main(){ double n,a; double x[11]; int i; double total; double ave; scanf("%lf %lf",&n,&a); for(i=0;i<=n;i++){ scanf("%lf",&x[i]); } for(i=0;i<=n;i++){ total+=x[i]; } ave=(total/n); if(ave==a){ printf("YES"); }else{ printf("NO"); } return 0; }