Official

A - 455 Editorial by cn449


初心者の方へ

\(A \neq B\) であるか、\(B = C\) であるかをそれぞれ判定すればよいです。

C++ や Python では、\(2\) つの整数が異なることは !=、等しいことは ==\(2\) つの条件がともに満たされているかは andを用いて判定することができます。

実装例

#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: