입력
5
1 2 3 4 5

 

출력예시
1
2
3
4
5

 

import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);

        int size = scan.nextInt();
        int[] a = new int[size];

        for(int i=0; i<a.length; i++){
            a[i] = scan.nextInt();
            System.out.println(a[i]);
        }
    }
}

복사했습니다!