울음참고 개발공부
728x90

 

https://school.programmers.co.kr/learn/courses/30/lessons/120834

 

프로그래머스

코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.

programmers.co.kr

 

 


 

class Solution {
    public String solution(int age) {
        StringBuilder result = new StringBuilder();
        
        while (age > 0) {
            int remainder = age % 10; 
            char alphabet = (char) ('a' + remainder); 
            result.insert(0, alphabet); 
            age /= 10;
        }
        
        return result.toString();   
    }
}

 

 

 


 

 

insert(int index, char ch)

 

index 번째에 ch 추가

 

 

※ 아스키코드 char 문자 표시 

class Solution {
	public char solution{
    	char ch = (char) (97);
        return ch;   // 출력 : a
    }
}

 

 

 

728x90
profile

울음참고 개발공부

@메각이

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!