[Level 1] 신규 아이디 추천


[Level 1] 신규 아이디 추천

프로그래머스 연습 문제 레벨 1 신규 아이디 추천 친구가 풀어보라고 추천해준 문제이다. 단계별 원하는 조건을 하나 하나 맞추다 보니 풀어지는 문제였다. #include #include #include using namespace std; void step_1(string &str) { transform(str.begin(), str.end(), str.begin(), ::tolower); } void step_2(string &str) { string temp; for (char& c : str) { if (islower(c) || isdigit(c) || c == '-' || c == '_' || c == '.') temp.push_back(c); } str = temp; } void step_3(st..


원문링크 : [Level 1] 신규 아이디 추천