結果

問題 No.1823 Tricolor Dango
ユーザー stngstng
提出日時 2022-05-14 16:00:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 971 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 100,320 KB
最終ジャッジ日時 2023-09-30 07:26:50
合計ジャッジ時間 7,096 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,388 KB
testcase_01 AC 196 ms
78,156 KB
testcase_02 AC 191 ms
78,008 KB
testcase_03 AC 200 ms
78,888 KB
testcase_04 AC 134 ms
77,680 KB
testcase_05 AC 135 ms
77,632 KB
testcase_06 AC 134 ms
77,456 KB
testcase_07 AC 95 ms
76,844 KB
testcase_08 AC 92 ms
76,672 KB
testcase_09 AC 92 ms
76,596 KB
testcase_10 AC 97 ms
76,580 KB
testcase_11 AC 93 ms
76,528 KB
testcase_12 AC 95 ms
76,780 KB
testcase_13 AC 95 ms
78,092 KB
testcase_14 AC 98 ms
77,944 KB
testcase_15 AC 97 ms
77,524 KB
testcase_16 AC 85 ms
78,420 KB
testcase_17 AC 88 ms
78,916 KB
testcase_18 AC 93 ms
83,668 KB
testcase_19 AC 120 ms
100,320 KB
testcase_20 AC 91 ms
83,644 KB
testcase_21 AC 172 ms
78,320 KB
testcase_22 AC 195 ms
78,780 KB
testcase_23 AC 161 ms
79,128 KB
testcase_24 AC 175 ms
78,188 KB
testcase_25 AC 190 ms
78,852 KB
権限があれば一括ダウンロードができます

ソースコード

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