#C14681. City Population Categories

    ID: 44357 Type: Default 1000ms 256MiB

City Population Categories

City Population Categories

You are given a list of city populations. Your task is to determine the category of the most populated city. If the list is empty, output "No cities".

The categorization rules are as follows:

  • \(\texttt{Small}\): If the maximum population is less than \(5000\).
  • \(\texttt{Medium}\): If the maximum population is between \(5000\) and \(20000\) (inclusive).
  • \(\texttt{Large}\): If the maximum population is greater than \(20000\).

Please note that the input will be read from stdin and the output should be printed to stdout.

inputFormat

The input consists of two lines:

  1. The first line contains an integer \(n\), representing the number of cities.
  2. If \(n > 0\), the second line contains \(n\) space-separated integers representing the population of each city.
  3. If \(n = 0\), no further input is provided.

outputFormat

Print a single line containing one of the following strings based on the category of the most populated city:

  • "No cities" if there are no cities.
  • "Small" if the maximum population is less than 5000.
  • "Medium" if the maximum population is between 5000 and 20000 (inclusive).
  • "Large" if the maximum population is greater than 20000.
## sample
0
No cities