Python:实现返回 Collatz 序列及其任意正整数的长度算法 from __future__ import annotations def n31(a: int) -> tuple[list[int], int<