結果

問題 No.1823 Tricolor Dango
ユーザー ああいい
提出日時 2022-01-29 11:44:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 82,148 KB
実行使用メモリ 102,256 KB
最終ジャッジ日時 2025-01-01 19:15:15
合計ジャッジ時間 4,049 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    N = int(input())
    A = list(map(int,input().split()))
    S = sum(A)
    if S % 3 != 0:
        print('No')
    else:
        M = max(A)
        if M * 3 <= S:
            print('Yes')
        else:
            print('No')
0