python写大整数

[I - Yet another A + B] (https://vjudge.net/problem/Gym-100735I)

You are given three numbers. Is there a way to replace variables A, B and C with these numbers so the equality A + B = C is correct?

Input
There are three numbers X1, X2 and X3 (1 ≤ Xi ≤ 10100), each on a separate line of input.

Output
Output either "YES", if there is a way to substitute variables A, B and C with given numbers so the equality is correct, or "NO" otherwise.1
2
3
Output
YES
Input
1
2
4
Output
YES
Input
1
3
5
Output
NO

a = int(input()) 
b = int(input()) 
c = int(input())
if a+a==b or a+a==c or b+b==a or b+b==c or c+c==a or c+c==b or a+b==c or a+c==b or b+c==a:
   print("YES")
else:
   print("NO") 

你可能感兴趣的:(python写大整数)