프로그래머스 120834 외계행성의 나이

Jmnote (토론 | 기여)님의 2023년 12월 1일 (금) 21:12 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

프로그래머스 120834 외계행성의 나이

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

string solution(int age) {
    string answer = to_string(age);
    for(char& ch: answer) {
        ch += 'a' - '0';
    }
    return answer;
}