13 条题解

  • 1
    @ 2023-7-16 19:14:50
    #include <iostream>
    #include <cmath>
    using namespace std;
    int k=0;int x;
    int f(int n)
    {
    
        k+=pow(n,2);
        if(k>=x)
        {
            return n;
        }
        n++;
        return f(n);
    }
    int main()
    {
    
    
       cin>>x;
       cout<<f(0)-1;
        return 0;
    }
    
    

    信息

    ID
    53
    时间
    1000ms
    内存
    128MiB
    难度
    4
    标签
    递交数
    1657
    已通过
    784
    上传者