인프런 특정문자뒤집기1 [JAVA] 특정 문자 뒤집기 - String(문자열) public class INF0105 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); INF0105 inf = new INF0105(); System.out.println(inf.solution(s)); } public String solution(String s) { String answer = ""; char[] c = s.toCharArray(); int lt = 0, rt = s.length() - 1; // 1 while(lt < rt) { // 2 if(!Character.isAlphabetic(c[lt])) { // 3 lt++; // 3 }else if(!C.. 2023. 10. 21. 이전 1 다음