1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
t=int(input())
for i in range(t):
nums=list(map(int,input().split()))
n=nums[3]
nums=nums[:3]
threshold=max(nums)*3
ans =n-(threshold-sum(nums))
if ans<0: print("NO")
else :
if ans%3 ==0 :
print("YES")
else:
print("NO")
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 10995 별 찍기 - 20 (0) | 2022.05.16 |
---|---|
codeforces 1619A - Square String? (0) | 2022.05.12 |
codeforces 785A - Anton and Polyhedrons (0) | 2022.05.12 |
leetcode 47. Permutations II (0) | 2022.05.12 |
codeforces 1030A - In Search of an Easy Problem (0) | 2022.05.11 |
댓글