結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2018-05-06 11:41:58 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 02:06:10 |
合計ジャッジ時間 | 950 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include <stdio.h> int main(){ double n,a; double x[11]; int i; double total=0; double ave=0; 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; }