foo.cc: In function 'uint64_t calc(uint64_t)':
foo.cc:8:8: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
8 | if (n <= k) {
| ~~^~~~
foo.cc: In function 'int main()':
foo.cc:33:16: warning: format '%llu' expects argument of type 'long long unsigned int*', but argument 3 has type 'uint64_t*' {aka 'long unsigned int*'} [-Wformat=]
33 | scanf("%d %llu", &k, &n);
| ~~~^ ~~
| | |
| | uint64_t* {aka long unsigned int*}
| long long unsigned int*
| %lu
foo.cc:34:13: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t' {aka 'long unsigned int'} [-Wformat=]
34 | printf("%llu\n", calc(n));
| ~~~^ ~~~~~~~
| | |
| | uint64_t {aka long unsigned int}
| long long unsigned int
| %lu
foo.cc:33:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
33 | scanf("%d %llu", &k, &n);
| ~~~~~^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务