728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181904
소스코드
using System;
using System.Collections.Generic;
using System.Linq;
public class Solution {
public string solution(string my_string, int m, int c) {
string answer = "";
for (int i = 0; i < my_string.Length/m; i++)
{
string s = my_string.Substring(i * m, m);
answer+= s[c - 1];
}
return answer;
}
}
728x90
'코딩공부 > 프로그래머스' 카테고리의 다른 글
[프로그래머스]Lv.0 문자 개수 세기 C# (char - char = int) (0) | 2023.06.07 |
---|---|
[프로그래머스]Lv.0 qr code C# (0) | 2023.06.07 |
[프로그래머스]Lv.0 문자열의 뒤의 n글자 C# (0) | 2023.06.07 |
[프로그래머스]Lv.0 부분 문자열 이어 붙여 문자열 만들기 C# (0) | 2023.06.07 |
[프로그래머스]Lv.0 배열 만들기 5 C# (0) | 2023.06.07 |