Wrong Answer

foo.cc: In function 'int main()':
foo.cc:6:6: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    6 |  if(a>2000&a==2000)printf("%.2f",0.8*a);
      |     ~^~~~~
foo.cc:7:12: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    7 |   else if(a>1500&a==1500)printf("%.2f",0.85*a);
      |           ~^~~~~
foo.cc:8:13: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    8 |    else if(a>1000&a==1000)printf("%.2f",0.9*a);
      |            ~^~~~~
foo.cc:9:14: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
    9 |     else if(a>500&a==500)printf("%.2f",0.95*a);
      |             ~^~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 320, expect 320.00. 3ms 384.0 KiB
#2 Wrong Answer Read 755.5, expect 717.72. 2ms 384.0 KiB
#3 Wrong Answer Read 1286.8, expect 1158.12. 2ms 384.0 KiB
#4 Wrong Answer Read 1500, expect 1275.00. 1ms 384.0 KiB
#5 Wrong Answer Read 2876, expect 2300.80. 2ms 384.0 KiB

信息

递交者
类型
递交
题目
P1027 超市促销活动
语言
C++
递交时间
2022-07-07 13:15:13
评测时间
2022-07-07 14:08:01
评测机
分数
0
总耗时
12ms
峰值内存
384.0 KiB