记录详情

Runtime Error

foo.c: In function 'main':
foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
    6 |         scanf("%d",n);
      |                ~^  ~
      |                 |  |
      |                 |  int
      |                 int *
foo.c:13:16: warning: statement with no effect [-Wunused-value]
   13 |          num[0]==1;
      |          ~~~~~~^~~
foo.c:14:16: warning: statement with no effect [-Wunused-value]
   14 |          num[1]==1;
      |          ~~~~~~^~~
foo.c:10:13: warning: array subscript 0 is outside array bounds of 'int[<Ub120>]' [-Warray-bounds]
   10 |          num[a]=0;
      |          ~~~^~~
foo.c:7:13: note: while referencing 'num.3'
    7 |         int num[n];
      |             ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 3ms 512.0 KiB

信息

递交者
类型
自测
题目
P1024 兔子数列
语言
C
递交时间
2022-08-18 12:46:18
评测时间
2022-08-18 12:46:18
评测机
分数
0
总耗时
3ms
峰值内存
512.0 KiB