class Solution { public String solution(String my_string, int m, int c) { String answer = ""; for(int i = 0; i < my_string.length(); i++) { if (i == (c - 1)){ answer += String.valueOf(my_string.charAt(c - 1)); c += m; } } return answer; } }
class Solution { public boolean solution(int x) { String[] str = String.valueOf(x).split(""); int num = 0; for(int i = 0; i < str.length; i ++) { num += Integer.parseInt(str[i]); } boolean answer = (x % num == 0) ? true : false; return answer; } }
import java.util.*; class Solution { public long solution(long n) { long answer = 0; String str = n + ""; String[] strArr = str.split(""); Long[] lonArr = new Long[strArr.length]; for(int i = 0; i = 0; i--) { str += lonArr[i] + ""; } answer = Long.parseLong(str); return..
class Solution { public long solution(long n) { long answer = -1; long num = 0; for(int i = 1; i
import java.util.*; class Solution { public String solution(String my_string) { String answer = ""; my_string = my_string.toLowerCase(); String[] strArr = my_string.split(""); Arrays.sort(strArr); for(int i = 0; i < strArr.length; i++) { answer += strArr[i]; } return answer; } }