728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120892
📝 나의 풀이
using System;
public class Solution {
public string solution(string cipher, int code) {
string answer = "";
char[] tmp = cipher.ToCharArray();
for(int i=code-1; i<cipher.Length; ){
answer += tmp[i].ToString();
i+=code;
}
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | C# | Lv.0] 주사위의 개수 (0) | 2023.09.17 |
---|---|
[프로그래머스 | C# | Lv.0] 팩토리얼 (0) | 2023.09.14 |
[프로그래머스 | Lv.0] 인덱스 바꾸기 (0) | 2023.09.13 |
[프로그래머스 | C# | Lv.0] 제곱수 판별하기 (0) | 2023.09.13 |
[프로그래머스 | Lv.0] 배열 회전시키기 (0) | 2023.09.12 |