求助,按输入样例输出是13e+006

P5738 【深基7.例4】歌唱比赛

咱就是说,您执行完score后把sscore清零行不行?
by IAWNA @ 2022-09-25 21:26:09


@[我是WA从来不AC](/user/566878) ?
by with_no_signal @ 2022-09-25 21:29:09


@[LxSmill](/user/733980) 1.把第7行 ```cpp for(int i=0;i<m;i++) cin>>s[m]; ``` 改为 ```cpp for(int i=0;i<m;i++) cin>>s[i]; ``` 2.把输出改为 ```cpp cout<<fixed<<setprecision(2)<<max<<endl; ```
by with_no_signal @ 2022-09-25 21:32:20


@[with_no_signal](/user/302803) 改完后还是会爆两个点,看不出哪里有问题。
by LxSmill @ 2022-09-25 21:51:09


@[LxSmill](/user/733980) ```cpp sscore=(sum-max-mil)/(m-2)*1.0; ``` 改成 ```cpp sscore=1.0*(sum-max-mil)/(m-2); ```
by with_no_signal @ 2022-09-25 21:56:22


@[with_no_signal](/user/302803) 没事了,把15行的乘1.0改为强制类型转换就能AC了,十分感谢
by LxSmill @ 2022-09-25 21:56:50


|