結果

問題 No.1823 Tricolor Dango
ユーザー titan23titan23
提出日時 2022-06-29 02:37:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 1,651 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 100,652 KB
最終ジャッジ日時 2023-08-14 03:46:36
合計ジャッジ時間 5,535 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,488 KB
testcase_01 AC 147 ms
78,016 KB
testcase_02 AC 117 ms
77,636 KB
testcase_03 AC 121 ms
77,840 KB
testcase_04 AC 97 ms
77,264 KB
testcase_05 AC 97 ms
77,012 KB
testcase_06 AC 98 ms
77,120 KB
testcase_07 AC 87 ms
76,708 KB
testcase_08 AC 87 ms
76,916 KB
testcase_09 AC 86 ms
76,572 KB
testcase_10 AC 89 ms
76,784 KB
testcase_11 AC 88 ms
76,680 KB
testcase_12 AC 86 ms
76,728 KB
testcase_13 AC 88 ms
77,684 KB
testcase_14 AC 87 ms
77,520 KB
testcase_15 AC 85 ms
77,448 KB
testcase_16 AC 81 ms
80,480 KB
testcase_17 AC 82 ms
80,484 KB
testcase_18 AC 90 ms
88,508 KB
testcase_19 AC 121 ms
100,652 KB
testcase_20 AC 89 ms
88,340 KB
testcase_21 AC 112 ms
78,496 KB
testcase_22 AC 118 ms
77,680 KB
testcase_23 AC 105 ms
77,880 KB
testcase_24 AC 111 ms
77,644 KB
testcase_25 AC 117 ms
78,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()

#  -----------------------  #

def main():
  n = int(input())
  A = list(map(int, input().split()))
  sm = sum(A)
  if sm % 3:
    return 'No'
  k = sm // 3
  for a in A:
    if a > k:
      return 'No'
  return 'Yes'


print('\n'.join(str(main()) for _ in range(int(input()))))
0