A - Three-Point Shot Editorial by en_translator


If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from “practicecontest” (https://atcoder.jp/contests/practice/). There you can find a sample code for each language.

In this problem, it is sufficient to check \(\min(X, Y) + 3 > \max(X, Y)\).

Sample Code (C++)

#include <stdio.h>
#include <algorithm>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int x = ri();
	int y = ri();
	puts(std::min(x, y) + 3 > std::max(x, y) ? "Yes" : "No");
	
	return 0;
}

Sample Code (Python)


x, y = map(int, input().split())
print('Yes' if min(x, y) + 3 > max(x, y) else 'No')

posted:
last update: