LearnPy Hub
← NumPy problems
Medium

Counting Values

Read integers and print each distinct value and how often it occurs (increasing value), using np.unique(..., return_counts=True).

Input

One line of integers.

Output

One line per value.

Sample 1

Input
3 1 3 2 1 3
Output
1 2
2 1
3 3

Sample 2

Input
5
Output
5 1
solution.py
Output appears here
Counting Values · Python practice problem · LearnPy Hub