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 a = parts[i, 0];
int b = parts[i, 1];
answer += my_strings[i].Substring(a, b-a+1);
}
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | C# | Lv.0] 공백으로 구분하기 2 (0) | 2023.10.02 |
---|---|
[프로그래머스 | C# | Lv.0] 문자열 잘라서 정렬하기 (0) | 2023.10.01 |
[프로그래머스 | C# | Lv.0] 글자 지우기 (0) | 2023.09.24 |
[프로그래머스 | C# | Lv.0] 문자열 돌리기 (0) | 2023.09.24 |
[프로그래머스 | C# | Lv.0] 주사위 게임 2 (0) | 2023.09.24 |