#C5188. Polycarp's Chocolate Eating Order

    ID: 48809 Type: Default 1000ms 256MiB

Polycarp's Chocolate Eating Order

Polycarp's Chocolate Eating Order

Polycarp loves chocolate bars and always eats them in the order of increasing sweetness. Given a list of chocolate bars with their respective sweetness levels, your task is to sort and return the sweetness levels in non-decreasing order.

Formally, you are given an integer ( n ) representing the number of chocolate bars and an array ( S = [s_1, s_2, \dots, s_n] ), where ( s_i ) denotes the sweetness level of the ( i )-th bar. You need to output the sorted list of sweetness levels. This is a straightforward problem of sorting an array.

inputFormat

The first line contains an integer ( n ) representing the number of chocolate bars. The second line contains ( n ) space-separated integers denoting the sweetness levels of the chocolate bars.

outputFormat

Output the sorted sweetness levels in non-decreasing order as space-separated integers on a single line.## sample

5
7 3 2 8 5
2 3 5 7 8