結果

問題 No.476 正しくない平均
ユーザー aoharu9825
提出日時 2019-07-18 10:22:10
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 28,416 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-24 19:20:12
合計ジャッジ時間 1,120 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
typedef long long int ll;

int main(void){
    double n,a;
    scanf("%lf%lf", &n,&a);

    ll sum = 0;
    for(int i=0; i<n; i++){
        int x;
        scanf("%d", &x);
        sum += x;
    }

    if(sum/n == a){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
}
0