結果

問題 No.1823 Tricolor Dango
ユーザー lloyzlloyz
提出日時 2022-01-28 23:22:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 195 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 100,340 KB
最終ジャッジ日時 2023-08-28 21:59:20
合計ジャッジ時間 5,106 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,256 KB
testcase_01 AC 195 ms
77,976 KB
testcase_02 AC 187 ms
78,172 KB
testcase_03 AC 184 ms
78,340 KB
testcase_04 AC 136 ms
77,596 KB
testcase_05 AC 134 ms
77,360 KB
testcase_06 AC 133 ms
77,336 KB
testcase_07 AC 92 ms
76,380 KB
testcase_08 AC 91 ms
76,504 KB
testcase_09 AC 94 ms
76,364 KB
testcase_10 AC 94 ms
76,388 KB
testcase_11 AC 96 ms
76,456 KB
testcase_12 AC 92 ms
76,572 KB
testcase_13 AC 92 ms
77,392 KB
testcase_14 AC 90 ms
77,416 KB
testcase_15 AC 88 ms
77,452 KB
testcase_16 AC 83 ms
80,444 KB
testcase_17 AC 83 ms
80,032 KB
testcase_18 AC 93 ms
88,108 KB
testcase_19 AC 129 ms
100,340 KB
testcase_20 AC 95 ms
88,044 KB
testcase_21 AC 174 ms
78,432 KB
testcase_22 AC 187 ms
78,404 KB
testcase_23 AC 157 ms
78,952 KB
testcase_24 AC 169 ms
78,116 KB
testcase_25 AC 185 ms
78,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for _ in range(t):
    n = int(input())
    A = list(map(int, input().split()))
    sumA = sum(A)
    maxA = max(A)
    if sumA % 3 == 0 and maxA <= sumA // 3:
        print("Yes")
    else:
        print("No")
0