记录详情

Wrong Answer

foo.c: In function 'main':
foo.c:8:36: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    8 |  switch(a>=b+c||b>=a+c||c>=a+b||a<=abs(b-c)||b<=abs(a-c)||c<=abs(a-b))
      |                                    ^~~
foo.c:8:41: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
    8 |  switch(a>=b+c||b>=a+c||c>=a+b||a<=abs(b-c)||b<=abs(a-c)||c<=abs(a-b))
      |                                        ~^~
<built-in>: note: built-in 'abs' declared here
foo.c:8:54: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
    8 |  switch(a>=b+c||b>=a+c||c>=a+b||a<=abs(b-c)||b<=abs(a-c)||c<=abs(a-b))
      |                                                     ~^~
<built-in>: note: built-in 'abs' declared here
foo.c:8:67: warning: 'abs' argument 1 promotes to 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
    8 |  switch(a>=b+c||b>=a+c||c>=a+b||a<=abs(b-c)||b<=abs(a-c)||c<=abs(a-b))
      |                                                                  ~^~
<built-in>: note: built-in 'abs' declared here
foo.c:20:13: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   20 |  switch(a==b&&a!=c||a==c&&a!=b||b==c&&b!=a)
      |         ~~~~^~~~~~
foo.c:20:37: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   20 |  switch(a==b&&a!=c||a==c&&a!=b||b==c&&b!=a)
      |                                 ~~~~^~~~~~
foo.c:10:3: warning: statement will never be executed [-Wswitch-unreachable]
   10 |   printf("NO");
      |   ^~~~~~~~~~~~
foo.c:15:14: warning: statement will never be executed [-Wswitch-unreachable]
   15 |   s=sqrt(p*(p-a)*(p-b)*(p-c));
      |            ~~^~~
foo.c:22:14: warning: statement will never be executed [-Wswitch-unreachable]
   22 |   s=sqrt(p*(p-a)*(p-b)*(p-c));
      |            ~~^~~
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%f%f%f",&a,&b,&c);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read General, expect Equilateral. 1ms 256.0 KiB

信息

递交者
类型
自测
题目
P2946 识别三角形
语言
C
递交时间
2022-01-03 19:29:44
评测时间
2022-01-03 19:29:44
评测机
分数
0
总耗时
1ms
峰值内存
256.0 KiB