結果

問題 No.1823 Tricolor Dango
ユーザー tnodinotnodino
提出日時 2022-04-02 19:36:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 29,852 KB
最終ジャッジ日時 2023-08-14 04:03:19
合計ジャッジ時間 3,508 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 125 ms
7,816 KB
testcase_02 AC 123 ms
7,868 KB
testcase_03 AC 121 ms
7,796 KB
testcase_04 AC 55 ms
8,184 KB
testcase_05 AC 55 ms
8,184 KB
testcase_06 AC 55 ms
8,260 KB
testcase_07 AC 48 ms
8,572 KB
testcase_08 AC 45 ms
8,536 KB
testcase_09 AC 50 ms
8,528 KB
testcase_10 AC 50 ms
8,536 KB
testcase_11 AC 49 ms
8,564 KB
testcase_12 AC 44 ms
8,468 KB
testcase_13 AC 53 ms
10,288 KB
testcase_14 AC 51 ms
10,304 KB
testcase_15 AC 47 ms
10,232 KB
testcase_16 AC 34 ms
12,620 KB
testcase_17 AC 35 ms
11,984 KB
testcase_18 AC 65 ms
18,756 KB
testcase_19 AC 132 ms
29,852 KB
testcase_20 AC 65 ms
18,332 KB
testcase_21 AC 81 ms
7,728 KB
testcase_22 AC 115 ms
7,780 KB
testcase_23 AC 57 ms
7,760 KB
testcase_24 AC 79 ms
7,804 KB
testcase_25 AC 114 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort()
    S = sum(A)
    M = S // 3
    if S % 3 == 0 and max(A) <= M:
        print('Yes')
    else:
        print('No')
    return

T = int(input())
for _ in range(T):
    solve()
0