5 solutions

  • 0
    @ 2024-7-18 18:57:18
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int a,b,c,temp;
        cin>>a>>b>>c;
        //排序
        if(a>b)
        {
            temp=a;
            a=b;
            b=temp;
        }
        if(b>c)
        {
            temp=b;
            b=c;
            c=temp;
        }
        if(a>b)
        {
            temp=a;
            a=b;
            b=temp;
        }
        if(c-1==b && b-1==a) cout<<"TRUE";
        else cout<<"FALSE";
        return 0;
    }
    

    Information

    ID
    35
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    253
    Accepted
    68
    Uploaded By