[프로그래머스/Java] Lv.1 소수 찾기 문제 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 class Solution { public int solution(int n) { int answer = 2; boolean prime = true; if(n==2 || n==3) { //n이 2 or 3이면 return 1; //소수 } for (int i = 5; i [JAVA] 프로그래머스 스쿨/JAVA Lv.1 2023. 1. 11. 17:29