class Solution { public String solution(int q, int r, String code) { String answer = ""; for(int i=0;i<code.length();i++){ char a = code.charAt(i); if (i%q==r) answer+=a; } return answer; } }
StringBuilder 디게 많이 쓰네..