섹션2. Array( 1,2차원 배열 )
📚 코딩테스트/Inflearn
2022. 8. 29. 14:01
2.1 큰 수 출력하기 solution import java.util.*; class Main { public ArrayList solution(int n, int[] arr){ ArrayList answer = new ArrayList(); answer.add(arr[0]); for(int i=1; iarr[i-1]) answer.add(arr[i]); } return answer; } public static void main(String[] args) { Main T = new Main(); Scanner kb = new Scanner(System.in); int n = kb.nextInt(); int[] arr = new int[n]; for(int i=0; i