프로그래머스

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 문자열 뒤집기

문제 코드 #include using namespace std; string solution(string my_string, int s, int e) { string answer = my_string; reverse(answer.begin() + s, answer.begin() + e + 1); return answer; }

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 문자열 뒤의 n글자

문제 코드 #include #include using namespace std; string solution(string my_string, int n) { string answer = ""; answer = my_string.substr(my_string.size() - n); return answer; }

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 간단한 논리 연산

문제 코드 #include #include using namespace std; bool solution(bool x1, bool x2, bool x3, bool x4) { return (x1 || x2) && (x3 || x4); }

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 수열과 구간 쿼리 4

문제 코드 #include using namespace std; vector solution(vector arr, vector queries) { vector answer; for(vector query : queries) { for(int i = query[0]; i

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 부분 문자열 이어 붙여 문자열 만들기

문제 코드 #include #include using namespace std; string solution(vector my_strings, vector parts) { string answer = ""; for (int i = 0; i < my_strings.size(); ++i) { for (int k = parts[i][0]; k

코딩테스트/프로그래머스(C++)_Level.0

[프로그래머스/C++] Lv.0 배열 만들기 5

문제 코드 #include using namespace std; vector solution(vector intStrs, int k, int s, int l) { vector answer; //string s; for(int i = 0; i

mane
'프로그래머스' 태그의 글 목록 (11 Page)