웅재의 코딩세상
[프로그래머스] 세로 읽기 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
string solution(string my_string, int m, int c) {
string answer = "";
for(int i=c-1; i<my_string.size(); i+=m){
answer += my_string[i];
}
return answer;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 문자 개수 세기 (0) | 2024.01.31 |
---|---|
[프로그래머스] qr code (0) | 2024.01.31 |
[프로그래머스] 문자열 뒤집기 (0) | 2024.01.31 |
[프로그래머스] 특정한 문자를 대문자로 바꾸기 (0) | 2024.01.30 |
[프로그래머스] 5명씩 (0) | 2024.01.30 |