/ Vijos /

记录详情

Accepted

foo.c: In function 'main':
foo.c:6:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long int *' [-Wformat=]
    6 |  scanf("%d", &M);
      |         ~^   ~~
      |          |   |
      |          |   long int *
      |          int *
      |         %ld
foo.c:15:13: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
   15 |    printf("%d %d\n", i, n - 1);
      |            ~^        ~
      |             |        |
      |             int      long int
      |            %ld
foo.c:15:16: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
   15 |    printf("%d %d\n", i, n - 1);
      |               ~^        ~~~~~
      |                |          |
      |                int        long int
      |               %ld
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%d", &M);
      |  ^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 1ms 256.0 KiB
#4 Accepted 1ms 256.0 KiB
#5 Accepted 1ms 256.0 KiB
#6 Accepted 3ms 256.0 KiB
#7 Accepted 9ms 256.0 KiB

信息

递交者
类型
递交
题目
P1302 连续自然数和
语言
C
递交时间
2022-03-18 19:46:36
评测时间
2022-03-18 19:46:36
评测机
分数
100
总耗时
19ms
峰值内存
256.0 KiB