1. 문자찾기 import java.util.Scanner; public class Main { public int solution(String str, char t){ int answer=0; str=str.toUpperCase(); t=Character.toUpperCase(t); for(int i=0; im){ // 최댓값 알고리즘 m=len; answer=x; } } return answer; } public static void main(String[] args){ Main T = new Main(); Scanner kb = new Scanner(System.in); String str = kb.nextLine(); System.out.print(T.solution(str); } } 4. 단어 ..
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