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