1 条题解

  • 0
    @ 2025-8-24 21:02:47

    自动搬运

    查看原文

    来自洛谷,原作者为

    avatar Moon_Lighter
    If I can be with you, I'd rather let all the stars in the sky fall, because your eyes are the brightest light in my life

    搬运于2025-08-24 21:02:46,当前版本为作者最后更新于2021-07-03 12:27:34,作者可能在搬运后再次修改,您可在原文处查看最新版

    自动搬运只会搬运当前题目点赞数最高的题解,您可前往洛谷题解查看更多

    以下是正文


    题意:

    求球体的体积。

    思路:

    套公式,可以使用 printf 函数保留后五位。

    代码:

    c语言

    #include<stdio.h>
    double r,v;
    int main()
    {
        scanf("%lf",&r);
        v=4.0/3*3.14*r*r*r;
        printf("%.5lf\n",v);
        return 0;
    }
    
    • 1

    信息

    ID
    6884
    时间
    1000ms
    内存
    128MiB
    难度
    1
    标签
    递交数
    4
    已通过
    2
    上传者