728x90
https://school.programmers.co.kr/learn/courses/30/lessons/181911
소스코드
using System;
public class Solution {
public string solution(string[] my_strings, int[,] parts) {
string answer = "";
for (int i = 0; i < parts.GetLength(0); i++)
{
int s = parts[i, 0];
int e = parts[i, 1];
answer += my_strings[i].Substring(s, e - s + 1);
}
return answer;
}
}
728x90
'코딩공부 > 프로그래머스' 카테고리의 다른 글
[프로그래머스]Lv.0 세로 읽기 C# (0) | 2023.06.07 |
---|---|
[프로그래머스]Lv.0 문자열의 뒤의 n글자 C# (0) | 2023.06.07 |
[프로그래머스]Lv.0 배열 만들기 5 C# (0) | 2023.06.07 |
[프로그래머스]Lv.0 문자열 여러 번 뒤집기 C# (Aarray.Reverse) (0) | 2023.06.07 |
[프로그래머스]Lv.0 9로 나눈 나머지 C# (string 배열 형변환 없이) (0) | 2023.06.07 |