[프로그래머스]순서쌍의 개수

박예림·2023년 3월 1일
0

코테

목록 보기
28/132

class Solution {
    public int solution(int n) {
        int answer = 0;
        int tem = 0;
        for (int i=1; i<=n; i++) {
            if (n%i == 0){
                tem++;
            }
        }
        answer = tem;
        return answer;
    }
}
profile
응애 나 아기개발자

0개의 댓글