#C14303. Counting Unique Integers

    ID: 43938 Type: Default 1000ms 256MiB

Counting Unique Integers

Counting Unique Integers

Given a list of integers, your task is to count the number of occurrences of each unique integer and print the result as a dictionary. The dictionary should have each integer as a key and its corresponding frequency as the value.

Formally, given a list \(L\) of integers, output the dictionary \(D\) such that \[ D[i] = \text{number of times } i \text{ occurs in } L \] for each unique integer \(i\) in \(L\).

inputFormat

The input is taken from stdin and consists of two lines:

  • The first line contains a single integer \(n\), the number of elements in the list.
  • The second line contains \(n\) space-separated integers.

outputFormat

Print the dictionary containing the count for each unique integer. The dictionary should be printed in the standard Python dictionary format, for example: {1: 2, 2: 3}.

## sample
1
1
{1: 1}