結果

問題 No.1823 Tricolor Dango
ユーザー tnodinotnodino
提出日時 2022-04-02 19:36:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 161 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 32,632 KB
最終ジャッジ日時 2024-05-01 16:52:28
合計ジャッジ時間 4,034 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 148 ms
10,752 KB
testcase_02 AC 152 ms
10,880 KB
testcase_03 AC 151 ms
10,752 KB
testcase_04 AC 75 ms
10,752 KB
testcase_05 AC 75 ms
10,752 KB
testcase_06 AC 74 ms
10,752 KB
testcase_07 AC 68 ms
11,136 KB
testcase_08 AC 65 ms
11,136 KB
testcase_09 AC 72 ms
11,008 KB
testcase_10 AC 71 ms
11,264 KB
testcase_11 AC 69 ms
11,136 KB
testcase_12 AC 63 ms
11,008 KB
testcase_13 AC 73 ms
12,740 KB
testcase_14 AC 71 ms
12,728 KB
testcase_15 AC 67 ms
12,436 KB
testcase_16 AC 51 ms
14,508 KB
testcase_17 AC 51 ms
14,836 KB
testcase_18 AC 83 ms
19,952 KB
testcase_19 AC 161 ms
32,632 KB
testcase_20 AC 86 ms
19,768 KB
testcase_21 AC 105 ms
10,752 KB
testcase_22 AC 143 ms
10,752 KB
testcase_23 AC 78 ms
10,752 KB
testcase_24 AC 103 ms
10,752 KB
testcase_25 AC 143 ms
10,752 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