Sign in $ create-account
~/problems ~/discussion ~/contests ~/submission
← ~/problems
P2017

Number of Divisors

Medium
// Description
Count how many positive divisors the integer n has.
// Input
A single integer n (1 <= n <= 10^12).
// Output
The number of divisors of n.
// Hint
Trial-divide up to sqrt(n), counting divisors in pairs.
// Samples
Sample Input
12
Sample Output
6
// Problem Info
DifficultyMedium
Acceptance40%
Time Limit1000 ms
Memory Limit65536 KB
Accepted4