公式
A - 455 解説 by en_translator
For beginners
- If you are new to learning programming and do not know where to start, please try Problem A "Welcome to AtCoder" from practice contest. There you can find a sample code for each language.
- Also, if you are not familiar with problems in programming contests, we recommend you to try some problems in "AtCoder Beginners Selection".
- 「C++入門 AtCoder Programming Guide for beginners (APG4b)」 is a C++ tutorial for competitive programmers. Sadly, this is only in Japanese too.
- 「Python入門 AtCoder Programming Guide for beginners (APG4bPython)」 is a Python tutorial for competitive programmers. Again, this is only in Japanese.
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")
投稿日時:
最終更新: