코딩테스트 (3) 썸네일형 리스트형 [프로그래머스/자바] 대소문자 바꿔서 출력하기 문제 코드 import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); for(int i=0;i [프로그래머스/자바] 짝수는 싫어요 문제 코드 import java.util.*; class Solution { public int[] solution(int n) { int[] answer; if(n%2==0){ answer = new int[n/2]; } else answer = new int[n/2+1]; for(int i=0;i [프로그래머스/자바] 제곱수 판별하기 문제 코드 class Solution { public int solution(int n) { return (Math.sqrt(n) % 1 == 0) ? 1 : 2; } } 💘 제곱근 구하기 - Math.sqrt() 메소드는 입력값과 출력값은 모두 double형 이전 1 다음