Programmers (188) 썸네일형 리스트형 직사각형 별찍기 123456789101112131415import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); for(int i = 0; i 이상한 문자 만들기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 class Solution { public String solution(String s) { String answer = ""; StringBuilder sb = new StringBuilder(); int i, cnt = 0; for (i = 0; i 짝수와 홀수 12345678910class Solution { public String solution(int num) { String answer = ""; if(num % 2 == 0) answer = "Even"; else answer = "Odd"; return answer; }}Colored by Color Scriptercs 자릿수 더하기 12345678910111213import java.util.*; public class Solution { public int solution(int n) { int answer = 0; while (n != 0) { answer += n % 10; n /= 10; } return answer; }}Colored by Color Scriptercs 나누어 떨어지는 숫자 배열 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import java.util.*; class Solution { public int[] solution(int[] arr, int divisor) { int[] answer = {}; List arrList = new ArrayList(); for (int i = 0; i 문자열을 정수로 바꾸기 12345class Solution { public int solution(String s) { return Integer.parseInt(s); }}Colored by Color Scriptercs 수박수박수박수박수박수? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class Solution { public String solution(int n) { String answer = ""; StringBuilder sb = new StringBuilder(); for (int i = 0; i 시저 암호 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 class Solution { public String solution(String s, int n) { String answer = ""; StringBuilder str = new StringBuilder(); for (int i = 0; i = 'a' && s.charAt(i) 'z') str.append((char) ('a' + s.charAt(i) + n - 'z' - 1)); else str.append((char) (s.charAt(i) + n)); } else if (s.charAt(i) >= 'A' && s.charAt(i) 'Z') str.append((char) ('A' +.. 이전 1 ··· 17 18 19 20 21 22 23 24 다음