結果

問題 No.1823 Tricolor Dango
ユーザー stng
提出日時 2022-05-14 16:00:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 572 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 94,676 KB
最終ジャッジ日時 2024-07-23 01:41:36
合計ジャッジ時間 5,261 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for i in range(t):
    n = int(input())
    a = [int(i) for i in input().split()]

    sa = sum(a)
    if sa % 3 != 0:
        print("No")
        continue
    dnum = sa // 3
    if max(a) > dnum:
        print("No")
    else:
        print("Yes")
0