LearnPy Hub
← Loops problems
Medium

Count Each Digit

Read a non-negative integer. Using a loop with % and //, count how often each digit appears and print digit:count for digits that appear, from 0 to 9, one per line.

Input

One integer.

Output

Lines.

Sample 1

Input
1223330
Output
0:1
1:1
2:2
3:3

Sample 2

Input
0
Output
0:1
solution.py
Output appears here
Count Each Digit · Python practice problem · LearnPy Hub