93分,求教T13

P2433 【深基1-2】小学数学 N 合一

CodeJuve @ 2024-09-12 13:12:20

这是我13题的代码,不知为何被RE了,请大佬看一下

            int r1=4,r2=10;
        double pi=3.141593;
        double v=4.0/3*pi*(r1*r1*r1*+r2*r2*r2);
        v=pow(v,1.0/3);
        cout<<v;

by dongzirui0817 @ 2024-09-12 13:19:10

@CodeJuve 答案向下取整


by dongzirui0817 @ 2024-09-12 13:20:14

@CodeJuve 还有,给你的是两个球


by dongzirui0817 @ 2024-09-12 13:20:57

当我没说(第2句)


by dongzirui0817 @ 2024-09-12 13:28:06

@CodeJuve double v=4.0/3*pi*(r1*r1*r1*+r2*r2*r2); 改为 \ double v=4.0/3*pi*(r1*r1*r1+r2*r2*r2);


by CodeJuve @ 2024-09-12 13:54:44

@dongzirui0817 好的谢谢大佬


|