foo.c: In function 'main':
foo.c:6:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
6 | scanf("%d", &M);
| ~^ ~~
| | |
| | long int *
| int *
| %ld
foo.c:15:13: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
15 | printf("%d %d\n", i, n - 1);
| ~^ ~
| | |
| int long int
| %ld
foo.c:15:16: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
15 | printf("%d %d\n", i, n - 1);
| ~^ ~~~~~
| | |
| int long int
| %ld
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d", &M);
| ^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务