5 solutions

  • 0
    @ 2023-10-3 21:50:56

    较为经典的一道入门题

    #include <bits/stdc++.h>
    using namespace std;
    int main(void)
    {
    int i,a,b,c;
    cin>>i;
    a=i/100;
    b=i/10%10;
    c=i%10;
    if ((a*a*a)+(b*b*b)+(c*c*c)==i)
    {
    cout<<"TRUE"<<endl;
    }
    else
    {
    cout<<"FALSE"<<endl;
    }
    return 0;
    }
    
    

    Information

    ID
    42
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    # Submissions
    883
    Accepted
    310
    Uploaded By