結果

問題 No.476 正しくない平均
コンテスト
ユーザー kotatsugame
提出日時 2017-01-28 16:56:45
言語 C90
(gcc 12.4.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 89 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,276 ms
コンパイル使用メモリ 28,228 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-18 13:37:05
合計ジャッジ時間 1,690 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 26
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:10: warning: data definition has no type or storage class
    1 | long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
      |          ^
main.c: In function ‘main’:
main.c:1:24: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
      |                        ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
main.c:1:34: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long int *’ [-Wformat=]
    1 | long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
      |                                 ~^     ~~
      |                                  |     |
      |                                  int * long int *
      |                                 %ld

ソースコード

diff #
raw source code

long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
0