class Solution { public int solution(String n_str) { int answer = Integer.parseInt(n_str); return answer; } }
class Solution { public int solution(String my_string, String is_prefix) { int answer = 1; if(is_prefix.length() > my_string.length()) { answer = 0; } else { String str = my_string.substring(my_string.length() - is_prefix.length()); if(!str.equals(is_prefix)) { answer = 0; } } return answer; } } class Solution { public int solution(String my_string, String is_suffix) { if(my_string.endsWith(is_s..
class Solution { public String solution(String rny_string) { return rny_string.replace("m", "rn"); } }
class Solution { public String solution(String my_string) { String answer = ""; for(int i = 0; i < my_string.length(); i++) { if(Character.isUpperCase(my_string.charAt(i))) { answer += String.valueOf(my_string.charAt(i)).toLowerCase(); } else if (Character.isLowerCase(my_string.charAt(i))) { answer += String.valueOf(my_string.charAt(i)).toUpperCase(); } } return answer; } }
class Solution { public int solution(int[] num_list) { int answer = 1; if(num_list.length > 10 ) { for(int i = 0; i < num_list.length; i++) { answer += num_list[i]; } answer -= 1; } else { for(int i = 0; i < num_list.length; i++) { answer *= num_list[i]; } } return answer; } }