Skip to content

Commit 77e2e30

Browse files
committed
pair count / 湲곗�
1 parent ea29442 commit 77e2e30

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

JustDevRae/Queue/pair_count.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function solution(n) {
2+
var answer = 0;
3+
4+
// 1부터 n까지 숫자를 확인
5+
for (let i = 1; i <= n; i++) {
6+
// i가 n의 약수인지 확인
7+
if (n % i === 0) {
8+
// i가 n의 약수인지 확인
9+
answer++;
10+
}
11+
}
12+
return answer;
13+
}

0 commit comments

Comments
 (0)