시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 130 58 38 46.341%

문제

모든 원소가 양의 정수인 집합이 있을 때, 원소를 거꾸로 뒤집고 그 원소를 오름차순으로 정렬하는 프로그램을 작성하세요.

단, 원소를 뒤집었을 때 0이 앞에 선행되는 경우는 0을 생략해야합니다.

입력

첫 번째로 입력되는 건 n (1 ≤ n ≤ 106)으로 사용자가 뒤이어 입력할 원소값을 결정합니다. 입력하는 줄에는 하나의 원소값 뿐만 아니라 여러 원소값도 들어갈 수 있습니다.

단, 입력하는 정수는 1012을 넘어선 안 됩니다.

출력

출력문은 위 문제 내용에 나와있는 정렬방법으로 정렬하여 아래 예제 출력을 참고하여 출력하세요.

예제 입력 1

10 5 2233
1601 90100 13009 802
50000000
301 7654321
210

예제 출력 1

5
5
12
103
109
208
1061
3322
90031
1234567
W3sicHJvYmxlbV9pZCI6IjU2NDgiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1ZWRcdWM2ZDBcdWMxOGMgXHVjODE1XHViODJjIiwiZGVzY3JpcHRpb24iOiI8cD5cdWJhYThcdWI0ZTAgXHVjNmQwXHVjMThjXHVhYzAwIFx1YzU5MVx1Yzc1OCBcdWM4MTVcdWMyMThcdWM3NzggXHVjOWQxXHVkNTY5XHVjNzc0IFx1Yzc4OFx1Yzc0NCBcdWI1NGMsIFx1YzZkMFx1YzE4Y1x1Yjk3YyBcdWFjNzBcdWFmYjhcdWI4NWMgXHViNGE0XHVjOWQxXHVhY2UwIFx1YWRmOCBcdWM2ZDBcdWMxOGNcdWI5N2MgXHVjNjI0XHViOTg0XHVjYzI4XHVjMjFjXHVjNzNjXHViODVjIFx1YzgxNVx1YjgyY1x1ZDU1OFx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkNTU4XHVjMTM4XHVjNjk0LjxcL3A+XHJcblxyXG48cD5cdWIyZTgsIFx1YzZkMFx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udW1iZXIgb2YgaW50ZWdlcnMuIFRoZSB2YWx1ZSBvZiBpbnB1dCBpbnRlZ2VyIGRvZXMgbm90IGV4Y2VlZCAxMDxzdXA+MTI8XC9zdXA+LjxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPlRoZSBvdXRwdXQgY29udGFpbnMgbiBsaW5lcyBvZiBzb3J0ZWQgbnVtYmVycyBhY2NvcmRpbmcgdG8gdGhlIHByb2Nlc3MgZGVzY3JpYmVkIGFib3ZlLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

ACM-ICPC > Regionals > Asia > Thailand > 2011 ACM-ICPC Asia Phuket Regional Programming Contest P1번

  • 문제를 번역한 사람: egpaltair
  • 문제의 오타를 찾은 사람: yclock