Baekjoon 23080
스키테일 암호


QUESTION ❔



CODE ⌨️

#include <iostream>
#include <string>

using namespace std;

int K;
string S;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> K;
	cin >> S;

	string answer = "";

	for (int i = 0; i < S.length();)
	{
		answer += S[i];
		i += K;
	}

	cout << answer << "\n";

	return 0;
}



RESULT 💛



SIMPLE DISCUSSION ✏️

문자열 관련 쉬운 문제였다.



SOURCE 💎

Baekjoon_Link 👈 Click here


*****
NOT A TALENT ❎ NOT GIVING UP ✅
CopyRight ⓒ 2022 DCherish All Rights Reserved.