Skip to content

Оптимизация для больших чисел: #325

@myltik1702

Description

@myltik1702

def digit_freq_optimized(n):
freq = [0] * 10
for d in str(abs(n)):
freq[int(d)] += 1
return {i: freq[i] for i in range(10) if freq[i]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions