/ Vijos /

记录详情

Accepted

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)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 384.0 KiB
#2 Accepted 2ms 384.0 KiB
#3 Accepted 2ms 384.0 KiB
#4 Accepted 2ms 384.0 KiB
#5 Accepted 2ms 384.0 KiB
#6 Accepted 3ms 384.0 KiB
#7 Accepted 2ms 384.0 KiB
#8 Accepted 2ms 384.0 KiB
#9 Accepted 3ms 384.0 KiB
#10 Accepted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1067 Warcraft III 守望者的烦恼
语言
C++
递交时间
2022-03-18 16:52:44
评测时间
2022-03-18 16:52:44
评测机
分数
100
总耗时
27ms
峰值内存
384.0 KiB