結果

問題 No.3786 Four Triplets, One Pair
コンテスト
ユーザー detteiuu
提出日時 2026-11-06 21:23:14
言語 PyPy3
(8.0.1 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 33 ms / 2,000 ms
+ 718µs
コード長 308 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 240 ms
コンパイル使用メモリ 64,352 KB
実行使用メモリ 53,676 KB
最終ジャッジ日時 2026-11-06 21:23:25
合計ジャッジ時間 2,750 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import defaultdict

A = list(map(int, input().split()))

def func(B):
    D = defaultdict(int)
    for b in B:
        D[b] += 1
    D = sorted(D.values())
    return D == [2, 3, 3, 3, 3]

ans = []
for i in range(1, 10):
    if func(A+[i]):
        ans.append(i)

print(len(ans))
print(*ans)
0