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