foo.c: In function 'main':
foo.c:6:2: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d", &M);
| ^~~~~~~
| scanf
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
/usr/bin/ld: /tmp/cc4Kbis5.o: in function `main':
foo.c:(.text.startup+0x2e): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务