#K1091. Second Smallest Unique Integer

    ID: 23351 Type: Default 1000ms 256MiB

Second Smallest Unique Integer

Second Smallest Unique Integer

You are given a single line of space‐separated integers. Your task is to find and print the second smallest unique integer among them. Here, unique means distinct integer values extracted from the list. If there is no second smallest number (i.e. if there is less than two distinct integers), print "Not found".

Note: Input is read from standard input and output must be written to standard output.

Examples:

  • Input: 2 3 4 2 1 5 3 → Distinct numbers: [1, 2, 3, 4, 5] → Second smallest: 2
  • Input: 1 1 1 1 → Only one distinct number → Output: Not found
  • Input: 5 5 4 4 3 3 2 2 1 1 0 0 -1 -1 -2 -2 → Distinct numbers: [-2, -1, 0, 1, 2, 3, 4, 5] → Second smallest: -1
  • Input: 10 20 30 40 → Distinct numbers: [10, 20, 30, 40] → Second smallest: 20
  • Input: -10000 9999 0 -50 50 50 -50 → Distinct numbers: [-10000, -50, 0, 50, 9999] → Second smallest: -50

inputFormat

The input consists of a single line containing space‐separated integers.

Read from standard input.

outputFormat

Print the second smallest unique (distinct) integer. If it does not exist, print Not found. Output to standard output.

## sample
2 3 4 2 1 5 3
2