結果

問題 No.1823 Tricolor Dango
ユーザー brthyyjpbrthyyjp
提出日時 2022-01-28 21:29:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 1,093 ms
コンパイル使用メモリ 86,428 KB
実行使用メモリ 104,784 KB
最終ジャッジ日時 2023-08-28 19:10:43
合計ジャッジ時間 4,304 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
70,860 KB
testcase_01 AC 123 ms
77,180 KB
testcase_02 AC 117 ms
77,500 KB
testcase_03 AC 120 ms
77,328 KB
testcase_04 AC 94 ms
76,680 KB
testcase_05 AC 95 ms
76,528 KB
testcase_06 AC 94 ms
76,828 KB
testcase_07 AC 81 ms
76,204 KB
testcase_08 AC 80 ms
76,604 KB
testcase_09 AC 81 ms
76,172 KB
testcase_10 AC 81 ms
76,116 KB
testcase_11 AC 80 ms
76,432 KB
testcase_12 AC 80 ms
76,172 KB
testcase_13 AC 81 ms
77,264 KB
testcase_14 AC 81 ms
77,392 KB
testcase_15 AC 79 ms
76,956 KB
testcase_16 AC 77 ms
79,640 KB
testcase_17 AC 76 ms
79,376 KB
testcase_18 AC 86 ms
87,004 KB
testcase_19 AC 107 ms
104,784 KB
testcase_20 AC 86 ms
86,812 KB
testcase_21 AC 110 ms
78,044 KB
testcase_22 AC 117 ms
77,340 KB
testcase_23 AC 104 ms
77,348 KB
testcase_24 AC 114 ms
77,992 KB
testcase_25 AC 114 ms
77,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = sys.stdin.buffer.readline
#input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

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')
        continue
    m = s//3
    if max(A) <= m:
        print('Yes')
    else:
        print('No')
0