Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Problem type

Given a list of n numbers, sort them and output them one per line from smallest to largest.

Input Specification

The first line of the input contains a positive integer n no greater than 100, the number of numbers to follow.

Each line after will have a single positive integer less than 32\,000.

Output Specification

Output the numbers in sorted order from smallest to largest, one per line.

Sample Input

4
4
3
2
1

Sample Output

1
2
3
4

Comments


  • 0
    Evay643  commented on Nov. 16, 2025, 1:01 a.m.

    can you guys help me i am stuck on this problem just give me a hint


    • 0
      jonathanzheng4  commented on Nov. 16, 2025, 2:13 a.m. edit 2
      1. put all the numbers in an array.
      2. sort it(its built-in, depends on your language)
      3. print each element of the array

      Note: I use java and c++. python may be different


  • 0
    21georgeburge  commented on Jan. 27, 2025, 11:03 a.m. edited

    very good problem!


    • 3
      21georgeburge  commented on Jan. 27, 2025, 11:04 a.m.

      i did notmean to comment this, sorry


  • 0
    granpanis222  commented on Sept. 25, 2020, 11:16 p.m.

    Why I'm I getting this?: Test case #1: IR (✗✗✗✗✗✗✗✗✗✗) [0.019s, 8.28 MB] (0/100) Test case #2: IR (✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗✗) [0.018s, 8.28 MB] (0/200)


    • 12
      Kirito  commented on Sept. 26, 2020, 2:47 a.m.

      This is a line-by-line checker, so you get a checkmark if you get the line correct, and an x if you get the line wrong.

      Running your code locally gives the error message AttributeError: 'int' object has no attribute 'sort'.