結果

問題 No.1823 Tricolor Dango
ユーザー kozykozy
提出日時 2022-01-28 21:25:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 29,828 KB
最終ジャッジ日時 2023-08-28 19:05:17
合計ジャッジ時間 3,082 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,880 KB
testcase_01 AC 129 ms
7,768 KB
testcase_02 AC 122 ms
7,848 KB
testcase_03 AC 122 ms
7,956 KB
testcase_04 AC 51 ms
8,168 KB
testcase_05 AC 51 ms
8,308 KB
testcase_06 AC 51 ms
8,224 KB
testcase_07 AC 42 ms
8,504 KB
testcase_08 AC 39 ms
8,536 KB
testcase_09 AC 45 ms
8,684 KB
testcase_10 AC 42 ms
8,684 KB
testcase_11 AC 40 ms
8,620 KB
testcase_12 AC 36 ms
8,596 KB
testcase_13 AC 42 ms
10,628 KB
testcase_14 AC 40 ms
10,548 KB
testcase_15 AC 38 ms
11,256 KB
testcase_16 AC 27 ms
12,772 KB
testcase_17 AC 31 ms
12,052 KB
testcase_18 AC 52 ms
18,664 KB
testcase_19 AC 95 ms
29,828 KB
testcase_20 AC 50 ms
18,392 KB
testcase_21 AC 80 ms
7,872 KB
testcase_22 AC 116 ms
7,768 KB
testcase_23 AC 56 ms
8,240 KB
testcase_24 AC 79 ms
7,884 KB
testcase_25 AC 118 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for i in range(T):
  N=int(input())
  A=list(map(int,input().split()))
  s=sum(A)
  if s%3!=0:
    print("No")
    continue
  k=s//3
  flag=True
  for j in A:
    if j>k:
      print("No")
      flag=False
      break
  if flag:
    print("Yes")
0