結果

問題 No.1823 Tricolor Dango
ユーザー kept1994kept1994
提出日時 2022-05-09 02:03:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 433 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 99,760 KB
最終ジャッジ日時 2023-09-23 02:48:05
合計ジャッジ時間 6,550 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
71,352 KB
testcase_01 AC 167 ms
77,656 KB
testcase_02 AC 133 ms
77,712 KB
testcase_03 AC 135 ms
77,872 KB
testcase_04 AC 103 ms
76,836 KB
testcase_05 AC 104 ms
77,332 KB
testcase_06 AC 105 ms
76,872 KB
testcase_07 AC 91 ms
76,940 KB
testcase_08 AC 91 ms
76,672 KB
testcase_09 AC 92 ms
76,512 KB
testcase_10 AC 92 ms
76,528 KB
testcase_11 AC 90 ms
76,812 KB
testcase_12 AC 89 ms
76,708 KB
testcase_13 AC 90 ms
77,796 KB
testcase_14 AC 89 ms
77,344 KB
testcase_15 AC 87 ms
76,860 KB
testcase_16 AC 84 ms
80,156 KB
testcase_17 AC 83 ms
80,012 KB
testcase_18 AC 93 ms
87,672 KB
testcase_19 AC 127 ms
99,760 KB
testcase_20 AC 91 ms
87,652 KB
testcase_21 AC 120 ms
78,180 KB
testcase_22 AC 131 ms
77,736 KB
testcase_23 AC 113 ms
77,676 KB
testcase_24 AC 120 ms
77,948 KB
testcase_25 AC 126 ms
77,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
MOD = 998244353
input = sys.stdin.readline

def main():
    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
        if max(A) > S // 3:
            print("No")
            continue
        print("Yes")
    return

if __name__ == '__main__':
    main()
0