7 solutions

  • 0
    @ 2025-10-12 16:05:49
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,c;
    	cin>>a>>b>>c;
    	if(a>b)
    	{
    		int s=a;
    		a=b;
    		b=s;
    	} 
    	if(a>c)
    	{
    		int s=a;
    		a=c;
    		c=s;
    	}
    	if(b>c)
    	{
    		int s=b;
    		b=c;
    		c=s;
    	}
    	if(a+1==b and b+1==c)
    	{
    		cout<<"TRUE";
    	}
    	else
    	{
    		cout<<"FALSE";
    	}
    	return 0;
    }	
    

    Information

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