记录详情

Wrong Answer

/in/foo.c: In function 'main':
/in/foo.c:16:24: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   16 |                 x1=(-b+sqrt(b*b-4*a*c))/2*a;
      |                        ^~~~
/in/foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
/in/foo.c:16:24: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   16 |                 x1=(-b+sqrt(b*b-4*a*c))/2*a;
      |                        ^~~~
/in/foo.c:16:24: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:12:17: warning: 'x2' may be used uninitialized [-Wmaybe-uninitialized]
   12 |                 printf("%.2f,%.2f",x1,x2);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.c:5:18: note: 'x2' was declared here
    5 |         float x1,x2;
      |                  ^~
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 284.0 KiB

信息

递交者
类型
自测
语言
C
递交时间
2025-11-06 15:51:05
评测时间
2025-11-06 15:51:05
评测机
分数
0
总耗时
1ms
峰值内存
284.0 KiB