Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Counter solution in Clear category for Ordinary Cardinals by kurosawa4434
from collections import Counter
def sort_digit_count(items: list[int]) -> list[int]:
def num_evaluate(n: int) -> tuple[int, int]:
return sum(10 ** int(k) * v for k, v in Counter(str(n)).items()), n
return sorted(items, key=num_evaluate)
Sept. 16, 2023