From ab7ad7c09e401fe79a076ea342b1067fd8e88066 Mon Sep 17 00:00:00 2001 From: licsber Date: Sat, 8 Jul 2023 13:22:56 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=95=B0=E8=AE=BA=E5=9F=BA=E7=A1=80=20?= =?UTF-8?q?=E5=94=AF=E4=B8=80=E5=88=86=E8=A7=A3=E5=AE=9A=E7=90=86=EF=BC=88?= =?UTF-8?q?=E7=AE=97=E6=9C=AF=E5=9F=BA=E6=9C=AC=E5=AE=9A=E7=90=86=EF=BC=89?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luogu/njit-baidu2023/tb.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 luogu/njit-baidu2023/tb.py diff --git a/luogu/njit-baidu2023/tb.py b/luogu/njit-baidu2023/tb.py new file mode 100644 index 0000000..8ac6c49 --- /dev/null +++ b/luogu/njit-baidu2023/tb.py @@ -0,0 +1,25 @@ +import io +import sys + +sys.stdin = io.StringIO('''4 +100 98 +42 32 +1000000000000000000 1 +41 40''') + + +# 数论基础 唯一分解定理(算术基本定理) +# x - n*p = y +# 则 n*p = x - y = z +# 大于1的整数就满足 可分解为任意素数乘积 +def fun(x, y): + z = x - y + return z > 1 + + +t = int(input()) +for _ in range(t): + print('YES' if fun(*map(int, input().split())) else 'NO') + + if __name__ == '__main__': + pass