코딩테스트/[C#] 프로그래머스
[프로그래머스 | C# | Lv.0] 순서쌍의 개수
냠냠쿠
2023. 8. 24. 07:51
728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120836
📝 나의 풀이
using System;
public class Solution {
public int solution(int n) {
int answer = 0;
for(int i=1; i<=n; i++){
if(n%i==0) answer++;
}
return answer;
}
}
728x90