Official
A - Isosceles Editorial by en_translator
Triangle ABC is isosceles if and only if one of \(a=b\), \(b=c\), or \(c=a\) holds.
This can be checked using an if statement.
Sample code in C++:
#include <bits/stdc++.h>
using namespace std;
int main(void){
int a,b,c;
cin>>a>>b>>c;
if((a==b)|(b==c)|(c==a))cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
Sample code in Python:
a,b,c=map(int, input().split())
if a==b or b==c or c==a:
print("Yes")
else:
print("No")
posted:
last update: