-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathc1072.java
More file actions
46 lines (39 loc) · 1021 Bytes
/
c1072.java
File metadata and controls
46 lines (39 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package codeup100;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class c1072 {
public static void main(String[] args) throws IOException {
//sol1 메모리: 15004 시간: 114
/*
Scanner sc = new Scanner(System.in);
int len = sc.nextInt();
int[] value = new int[len];
for(int i = 0; i <value.length; i++) {
value[i] =sc.nextInt();
System.out.println(value[i]);
}
*/
//sol2
// 메모리: 14316 kb 수행 시간: 111 ms
/*
Scanner sc = new Scanner(System.in);
int len = sc.nextInt();
int[] nums = new int[len];
for(int i : nums){
nums[i] = sc.nextInt();
System.out.println(nums[i]);
}
sc.close();
*/
//sol3
// 메모리 :11132 kb 수행 시간:68 ms
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String n = br.readLine();
String[] num = br.readLine().split(" ");
for(String s : num){
System.out.println(s);
}
}
}