結果

問題 No.1823 Tricolor Dango
ユーザー playerplayer
提出日時 2024-01-07 17:18:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 101,600 KB
最終ジャッジ日時 2024-01-07 17:18:32
合計ジャッジ時間 4,703 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,332 KB
testcase_01 AC 182 ms
77,000 KB
testcase_02 AC 156 ms
77,120 KB
testcase_03 AC 159 ms
77,136 KB
testcase_04 AC 98 ms
75,936 KB
testcase_05 AC 99 ms
75,936 KB
testcase_06 AC 99 ms
75,936 KB
testcase_07 AC 63 ms
75,012 KB
testcase_08 AC 57 ms
75,012 KB
testcase_09 AC 58 ms
75,012 KB
testcase_10 AC 57 ms
75,012 KB
testcase_11 AC 56 ms
75,012 KB
testcase_12 AC 54 ms
75,012 KB
testcase_13 AC 54 ms
76,108 KB
testcase_14 AC 53 ms
75,920 KB
testcase_15 AC 51 ms
75,652 KB
testcase_16 AC 44 ms
68,116 KB
testcase_17 AC 44 ms
68,072 KB
testcase_18 AC 55 ms
78,092 KB
testcase_19 AC 91 ms
101,600 KB
testcase_20 AC 54 ms
78,068 KB
testcase_21 AC 141 ms
76,992 KB
testcase_22 AC 156 ms
77,000 KB
testcase_23 AC 126 ms
76,832 KB
testcase_24 AC 138 ms
76,992 KB
testcase_25 AC 158 ms
77,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())

for _ in range(t):
    n = int(input())
    a = list(map(int, input().split()))
    if sum(a) % 3 != 0:
        print("No")
    else:
        num = sum(a) // 3
        if max(a) > num:
            print("No")
        else:
            print("Yes")
0