Official

A - 455 Editorial by en_translator


For beginners

It suffices to check whether \(A \neq B\), and whether \(B = C\).

In C++ and Python, one can check if two integers are different with !=, if they are equal with ==, and if two conditions are both satisfied with and.

Sample code

#include <bits/stdc++.h>
using namespace std;

int main() {
	int a, b, c;
	cin >> a >> b >> c;
	if (a != b and b == c) cout << "Yes\n";
	else cout << "No\n";
}
a, b, c = map(int, input().split())
print("Yes" if a != b and b == c else "No")

posted:
last update: