foo.c: In function 'main':
foo.c:8:14: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
scanf("%d",&x[k]);
~^ ~~~~~
%ld
foo.c:27:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
printf("%d\n",b);
~^
%ld
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^~~~~~~~~~~~~~
foo.c:8:6: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x[k]);
^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务