Algorithm1 [프로그래머스] 대소문자 바꿔서 출력하기 문제https://school.programmers.co.kr/learn/courses/30/lessons/181949 풀이대소문자 판별과 변환에 처음엔 무식하게 ASCII 값을 사용했다. 심지어 문제를 처음 봤을 때 toLowerCase(), toUpperCase()가 생각났음에도 불구하고..fun main(args: Array) { val s1 = readLine()!! for(i in 0..s1.length-1){ val ascii = s1[i].toInt() // a = 97, A = 65 val result = if(ascii for문에서 간단히 문자열을 한글자씩 받아올 수 있었다.isLowerCase(), toLowerCase(), toUppe.. 2025. 3. 20. 이전 1 다음