euisblue
12948. 핸드폰 번호 가리기

Level 1 핸드폰 번호 가리기

시간 복잡도: O(len(n)), len(n) = length of phone_number

1#include <string> 2#include <vector> 3using namespace std; 4 5string solution(string phone_number) { 6 const int BOUND = phone_number.size()-4; 7 for(int i=0; i<BOUND; ++i) phone_number[i] = '*'; 8 return phone_number; 9}