#C13289. Frequency Count
Frequency Count
Frequency Count
Given a list of integers, you are required to compute the frequency of each distinct integer and print the result as a dictionary in the following format:
\(\{k_1: v_1, k_2: v_2, \dots, k_m: v_m\}\)
where each \(k_i\) is a unique integer and \(v_i\) is its frequency (number of occurrences) in the list. The dictionary should list keys in ascending order. Input is read from standard input (stdin) and the output must be printed to standard output (stdout).
Note: If the input list is empty, output an empty dictionary: {}.
inputFormat
The first line contains a single integer \(n\) which denotes the number of elements in the list. The second line contains \(n\) space-separated integers.
outputFormat
Print the dictionary representing the frequency count of the integers. The keys should be sorted in ascending order. The dictionary must be in the format:
\(\{k_1: v_1, k_2: v_2, \dots, k_m: v_m\}\)
## sample0
{}