結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2017-01-28 16:56:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 89 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 19,712 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 21:06:54 |
| 合計ジャッジ時間 | 998 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 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:1:10: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
main.c:1:12: warning: return type defaults to ‘int’ [-Wimplicit-int]
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:12: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:24: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
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: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:24: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
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
main.c:1:66: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
1 | long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}
|
ソースコード
long a,s;x;main(n){for(scanf("%d%d",&n,&a);~scanf("%d",&x);s+=x);puts(a*n-s?"NO":"YES");}