2 solutions
-
-2
- 1
Information
- ID
- 856
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 539
- Accepted
- 109
- Uploaded By
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a>b) //保证 a<=b
{
int t=a;
a=b;
b=t;
}
if(a>c) //保证a<=c
{
int t=a;
a=c;
c=t;
}
if(b>c) //保证b<=c
{
int t=b;
b=c;
c=t;
}
if(a+1==b&&b+1==c)
{
cout<<"TRUE";
}
else
{
cout<<"FALSE";
}
return 0;
}