记录详情

Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:13: warning: format '%f' expects argument of type 'float*', but argument 2 has type 'int' [-Wformat=]
    5 |     scanf("%f",a);
      |            ~^  ~
      |             |  |
      |             |  int
      |             float*
/in/foo.cc:15:32: warning: format '%f' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
   15 |                     printf(".2%f",a) ;
      |                               ~^  ~
      |                                |  |
      |                                |  int
      |                                double
      |                               %d
/in/foo.cc:5:10: warning: 'a' is used uninitialized [-Wuninitialized]
    5 |     scanf("%f",a);
      |     ~~~~~^~~~~~~~
/in/foo.cc:4:9: note: 'a' was declared here
    4 |     int a;
      |         ^
# 状态 耗时 内存占用
#1 Runtime Error 2ms 536.0 KiB

信息

递交者
类型
自测
语言
C++
递交时间
2026-11-15 20:21:38
评测时间
2026-11-15 20:21:38
评测机
分数
0
总耗时
2ms
峰值内存
536.0 KiB