Created
May 31, 2022 03:43
-
-
Save mym0404/7d263bc48f3726f07ea3475ad8c77f04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.Arrays; | |
public class Main { | |
public static void main(String[] args) throws IOException { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); | |
int n = Integer.parseInt(br.readLine()); | |
int[] arr = new int[n]; | |
for(int i = 0; i < n; i++) | |
arr[i] = Integer.parseInt(br.readLine()); | |
Arrays.sort(arr); | |
for(int i = 0; i< n; i++) | |
bw.write(arr[i] + "\n"); | |
bw.flush(); | |
bw.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment