Main.cpp: In function 'int main()':
Main.cpp:21:15: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
21 | scanf("%lld", &n);
| ~~~^ ~~
| | |
| | int*
| long long int*
| %d
Main.cpp:23:19: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
23 | scanf("%lld", &a[i]);
| ~~~^ ~~~~~
| | |
| | int*
| long long int*
| %d
Main.cpp:57:16: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
57 | printf("%lld\n", ans);
| ~~~^ ~~~
| | |
| | int
| long long int
| %d
Main.cpp:21:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | scanf("%lld", &n);
| ~~~~~^~~~~~~~~~~~
Main.cpp:23:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | scanf("%lld", &a[i]);
| ~~~~~^~~~~~~~~~~~~~~