stove.cpp: In function 'int main()':
stove.cpp:22:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
22 | printf("%d", ans);
| ~^ ~~~
| | |
| int long long int
| %lld
stove.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | scanf("%d %d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~
stove.cpp:14:38: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | for (int i = 0; i < n; ++i) scanf("%lld", &a[i]);
| ~~~~~^~~~~~~~~~~~~~~