foo.c: In function 'main':
foo.c:17:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
17 | printf("%d",cnt);
| ~^ ~~~
| | |
| | long long int
| int
| %lld
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
5 | scanf("%d%d",&n,&k);
| ^~~~~~~~~~~~~~~~~~~
foo.c:7:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
7 | {scanf("%d",&a[i]);
| ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务