一开始我是这样输出的,全WA。
std::cout << std::setprecision(3) << L << std::endl;
后来这样输出就可AC了。不知道为什么,难道必须和 std::fixed 一起使用吗??
std::fixed
可是我在本地测试这两种都可以运行且输出结果也都是一样的。
std::cout << std::fixed << std::setprecision(3) << L << std::endl;