Problem 42791. Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them
example:
n=14 ; Divisors={1,7,2,14} ; y=4
n=68 ; Divisors={1,2,34,17,4,68} ; y=6
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
Zikobrelli
on 1 Apr 2016
Peng Liu ,thanks for the suggestion.I added a few tests.
James, the reason sqrt is forbidden is what Peng Liu suggested.
Jan Orwat
on 1 Apr 2016
Hey, this problem is essentially the same as problem 2664 by Jean-Marie.
Peng Liu
on 1 Apr 2016
Good catch!
Solution Comments
Show commentsProblem Recent Solvers65
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1894 Solvers
-
Find out missing number from a vector of 9 elements
303 Solvers
-
Generate a random matrix A of (1,-1)
362 Solvers
-
614 Solvers
-
Is this triangle right-angled?
6103 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!