[BOJ 13225] Divisors
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
2.0s
Memory limit:
512M
Problem types
Allowed languages
Given an integer n, compute the number of divisors of n.</p>
A divisor is an integer, d (1 <= d <= n) that evenly divides n.
Example: If n=10, divisors are: 1, 2, 5 and 10. So the result would be 4.
Example: If n=104717, divisors are 1 and 104717. This is a prime number so the number of divisors is 2.
입력 형식
The first line contains an integer C (1 <= C <= 10) with the amount of numbers you need to process. The next C lines will contain an integer n (1 <= n < 10000) each. You have to compute the number of divisors of these values.
출력 형식
For each integer n, print a line with the number n itself, a space and the number of divisors.
예제 입력
10
1
2
3
4
5
9999
31
10
20
1047
예제 출력
1 1
2 2
3 2
4 3
5 2
9999 12
31 2
10 4
20 6
1047 4
Comments