1 条题解

  • -1
    @ 2025-10-8 16:48:04

    scy视频

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        scanf("%d", &n);
        double s = 0;
        for(int i = 1; i <= n; i++)
        {
            s = s + 1.0 / i;
        }
        printf("%.5lf", s);
        return 0;
    }
    
    • 1

    *【C++语言:循环结构(for)】分数求和(视频)

    信息

    ID
    11
    时间
    1000ms
    内存
    128MiB
    难度
    8
    标签
    递交数
    1945
    已通过
    345
    上传者