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