Submit solution

Points: 5
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
    PuffinLynx  commented on Aug. 24, 2021, 4:30 a.m. edited

    To C++ Coders, STL functions will be helpful.


  • -5
    TheMediumOne  commented on Feb. 18, 2021, 7:51 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


  • -6
    1083574  commented on Jan. 31, 2021, 7:53 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


  • 3
    karlma  commented on Jan. 27, 2021, 10:16 p.m.

    Why am I getting WA on the second test case?


    • 5
      ryanguorocket  commented on Jan. 28, 2021, 12:04 a.m.

      You should print duplicate elements.


      • 4
        karlma  commented on Feb. 8, 2021, 1:09 p.m.

        facepalm


  • 0
    granpanis222  commented on Sept. 25, 2020, 7: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)


    • 4
      Kirito  commented on Sept. 25, 2020, 10:47 p.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'.


  • -5
    Amoenus  commented on Sept. 9, 2020, 3:11 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.


    • 8
      Plasmatic  commented on Sept. 9, 2020, 3:50 p.m. edited

      MLE means your solution exceeded the memory limit. Given that the limit is only 16MB for this problem, it may be impossible to pass in certain languages.


      • -9
        PerfectlyInternal  commented on Feb. 9, 2021, 4:25 p.m.

        This comment is hidden due to too much negative feedback. Click here to view it.


        • 10
          wleung_bvg  commented on Feb. 9, 2021, 5:00 p.m. edited

          Unfortunately certain languages take more than 16MB even for a simple hello world program :(