记录详情

Runtime Error

/in/foo.c: In function 'main':
/in/foo.c:6:15: warning: format '%f' expects argument of type 'float *', but argument 2 has type 'int *' [-Wformat=]
    6 |     scanf("a=%f,b=%f", &a, &b);
      |              ~^        ~~
      |               |        |
      |               float *  int *
      |              %d
/in/foo.c:6:20: warning: format '%f' expects argument of type 'float *', but argument 3 has type 'int *' [-Wformat=]
    6 |     scanf("a=%f,b=%f", &a, &b);
      |                   ~^       ~~
      |                    |       |
      |                    float * int *
      |                   %d
/in/foo.c:4:24: warning: unused variable 'd' [-Wunused-variable]
    4 | int a, b, s = 0, i, c, d = 1;
      |                        ^
/in/foo.c: In function 'fn':
/in/foo.c:17:16: warning: variable 'b' set but not used [-Wunused-but-set-variable]
   17 |     int a = 1, b = 1, i, c;
      |                ^
/in/foo.c:17:9: warning: variable 'a' set but not used [-Wunused-but-set-variable]
   17 |     int a = 1, b = 1, i, c;
      |         ^
/in/foo.c:15:5: warning: infinite recursion detected [-Winfinite-recursion]
   15 | int fn(int x)
      |     ^~
/in/foo.c:18:9: note: recursive call
   18 |     a = fn(1);
      |         ^~~~~
# 状态 耗时 内存占用
#1 Runtime Error 8ms 8.414 MiB
#2 Runtime Error 8ms 8.414 MiB
#3 Runtime Error 7ms 8.418 MiB
#4 Runtime Error 7ms 8.418 MiB

信息

递交者
类型
递交
比赛
2025年春 南师大“程序设计与竞赛”作业赛第一场
语言
C
递交时间
2025-03-06 12:57:20
评测时间
2025-03-06 12:57:20
评测机
分数
0
总耗时
33ms
峰值内存
8.418 MiB