if the int is 48 it has 8 as a divisor but sqrt(48) is about 6.9
In fact -- as stated in other comments of high-rated answers -- you can even stop at sqrt(integer).
sqrt(integer)
good idea
This isn't a Kata issue, but instead a CW issue.
Interesting, thank you for the tip.
Loading collection data...
if the int is 48 it has 8 as a divisor but sqrt(48) is about 6.9
In fact -- as stated in other comments of high-rated answers -- you can even stop at
sqrt(integer)
.good idea
This isn't a Kata issue, but instead a CW issue.
Interesting, thank you for the tip.