본문으로 바로가기
728x90
반응형

문제

 

 

반응형

 

풀이

 

 

1
2
3
4
5
6
7
8
9
10
11
12
class Solution {
    public String solution(String cipher, int code) {
        int code1=code;
        String answer="";
        
        while(code<=cipher.length()){
            answer+=cipher.charAt(code-1);
                code+=code1;
            }
        return answer;
    }
}
cs

 

728x90
반응형