結果

問題 No.1823 Tricolor Dango
ユーザー iii aaaiii aaa
提出日時 2022-01-29 21:21:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 567 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 102,260 KB
最終ジャッジ日時 2023-08-30 20:49:04
合計ジャッジ時間 4,598 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,252 KB
testcase_01 AC 147 ms
80,824 KB
testcase_02 AC 145 ms
80,812 KB
testcase_03 AC 135 ms
80,940 KB
testcase_04 AC 106 ms
77,940 KB
testcase_05 AC 104 ms
77,980 KB
testcase_06 AC 106 ms
78,180 KB
testcase_07 AC 89 ms
77,272 KB
testcase_08 AC 90 ms
77,200 KB
testcase_09 AC 91 ms
77,044 KB
testcase_10 AC 90 ms
77,044 KB
testcase_11 AC 89 ms
77,248 KB
testcase_12 AC 89 ms
77,228 KB
testcase_13 AC 90 ms
78,004 KB
testcase_14 AC 90 ms
78,264 KB
testcase_15 AC 88 ms
77,584 KB
testcase_16 AC 85 ms
80,608 KB
testcase_17 AC 84 ms
80,428 KB
testcase_18 AC 94 ms
88,476 KB
testcase_19 AC 127 ms
102,260 KB
testcase_20 AC 92 ms
88,440 KB
testcase_21 AC 124 ms
79,632 KB
testcase_22 AC 133 ms
80,648 KB
testcase_23 AC 113 ms
78,220 KB
testcase_24 AC 121 ms
79,424 KB
testcase_25 AC 132 ms
80,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
import heapq

def inputSynario():
    input = stdin.readline
    num_list = []
    T = int(input().rstrip())
    for i in range(T * 2):
        num_list.append(list(map(int, input().rstrip().split())))
    return num_list

synario = inputSynario()
for synarioId in range(len(synario)//2):
    N=synario[synarioId * 2]
    A=synario[synarioId * 2 + 1]
    dangoCountSum = sum(A)
    if(dangoCountSum % 3 == 0):
        kushiCount = dangoCountSum // 3
        if(max(A) <= kushiCount):
            print("Yes")
            continue
    print("No")
0