結果

問題 No.1823 Tricolor Dango
コンテスト
ユーザー ikoma
提出日時 2022-01-28 22:51:53
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 299 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 125 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 113,704 KB
最終ジャッジ日時 2026-10-09 15:00:15
合計ジャッジ時間 4,135 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 2 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

T=int(input())
from collections import defaultdict

for t in range(T):
    N=int(input())
    A=list(map(lambda x:-int(x),input().split()))
    cnt = defaultdict(int)
    for a in A:
        cnt[a%3]+=1
    print("Yes" if cnt[1]%3==0 and cnt[2]%3==0 else "No")
0