프로그래머스 181907 문자열의 앞의 n글자

Jmnote (토론 | 기여)님의 2023년 11월 14일 (화) 22:44 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

프로그래머스 181907 문자열의 앞의 n글자

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

string solution(string my_string, int n) {
    return my_string.substr(0, n);
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}