結果

問題 No.1823 Tricolor Dango
ユーザー V_Melville
提出日時 2022-01-29 19:38:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 172 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 946 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 32,188 KB
最終ジャッジ日時 2025-01-02 14:44:26
合計ジャッジ時間 3,951 ms
ジャッジサーバーID
(参考情報)
judge1 / 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)
    mx = max(a)
    print("Yes") if s % 3 == 0 and mx <= s/3 else print("No")
0