#41109: JAVA AC


712045@st.lths.tc.edu.tw (程式餓靈)

學校 : 嶺東高級中學
編號 : 140198
來源 : [123.194.13.171]
最後登入時間 :
2025-09-23 16:37:21

import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.Arrays; class Test { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] input = new String[n]; for (int i = 0; i < n; i++) { input[i] = br.readLine(); } br.close(); Arrays.sort(input); for (String str : input) { System.out.println(str); } } }