记录详情

Runtime Error

foo.c: In function 'main':
foo.c:5:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
    5 |         scanf("%d%d", a, b);
      |                ~^     ~
      |                 |     |
      |                 int * int
foo.c:5:19: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=]
    5 |         scanf("%d%d", a, b);
      |                  ~^      ~
      |                   |      |
      |                   int *  int
foo.c:6:18: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    6 |         if (b = 1, 3, 5, 7, 8, 10, 12)
      |                  ^
foo.c:6:21: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    6 |         if (b = 1, 3, 5, 7, 8, 10, 12)
      |                     ^
foo.c:6:24: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    6 |         if (b = 1, 3, 5, 7, 8, 10, 12)
      |                        ^
foo.c:6:27: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    6 |         if (b = 1, 3, 5, 7, 8, 10, 12)
      |                           ^
foo.c:6:30: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    6 |         if (b = 1, 3, 5, 7, 8, 10, 12)
      |                              ^
foo.c:10:18: warning: right-hand operand of comma expression has no effect [-Wunused-value]
   10 |         if (b = 4, 6, 9, 11)
      |                  ^
foo.c:10:21: warning: right-hand operand of comma expression has no effect [-Wunused-value]
   10 |         if (b = 4, 6, 9, 11)
      |                     ^
foo.c:14:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   14 |         if (b = 2)
      |             ^
foo.c:19:21: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   19 |                 if (d = 0)
      |                     ^
foo.c:21:29: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   21 |                         if (e = 0)
      |                             ^
foo.c:32:29: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   32 |                         if (f = 0)
      |                             ^
foo.c:36:29: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   36 |                         if (f = 0)
      |                             ^
foo.c:5:9: warning: 'a' is used uninitialized [-Wuninitialized]
    5 |         scanf("%d%d", a, b);
      |         ^~~~~~~~~~~~~~~~~~~
foo.c:4:13: note: 'a' was declared here
    4 |         int a, b, c, d, e, f;
      |             ^
foo.c:5:9: warning: 'b' is used uninitialized [-Wuninitialized]
    5 |         scanf("%d%d", a, b);
      |         ^~~~~~~~~~~~~~~~~~~
foo.c:4:16: note: 'b' was declared here
    4 |         int a, b, c, d, e, f;
      |                ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 1ms 284.0 KiB
#2 Runtime Error Segmentation fault 2ms 280.0 KiB
#3 Runtime Error Segmentation fault 1ms 316.0 KiB
#4 Runtime Error Segmentation fault 2ms 284.0 KiB
#5 Runtime Error Segmentation fault 2ms 284.0 KiB

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
2023年新生赛(第一场)
语言
C
递交时间
2023-08-15 19:35:20
评测时间
2023-08-15 19:35:20
评测机
分数
0
总耗时
10ms
峰值内存
316.0 KiB