foo.c: In function 'main':
foo.c:8:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);//输入n
^~~~~~~~~~~~~~
foo.c:11:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);//输入数组
^~~~~~~~~~~~~~~~~~
foo.c:12:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&k);//输入k
^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务