프로그래머스 181903 qr code

Jmnote (토론 | 기여)님의 2023년 9월 16일 (토) 13:07 판

1 개요

프로그래머스 181903 qr code


2 C++

#include <string>
#include <vector>

using namespace std;

string solution(int q, int r, string code) {
    string answer = "";
    for(int i=0; i<code.length(); i++) {
        if(i%q == r) answer += code[i];
    }
    return answer;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}