+ 8

Hello. This is Challenge: Which integer has the largest number of divisors? But i get wrong result. Why?

https://code.sololearn.com/cIITkEn77O15/?ref=app

29th Sep 2017, 2:01 PM
Podretyz
Podretyz - avatar
5 Answers
+ 10
@Podretyz Because you're missing one variable to store the *current* maximum number of factors. You're comparing the count of factors with the maximum number which are 2 different things.
29th Sep 2017, 4:00 PM
Zephyr Koo
Zephyr Koo - avatar
+ 8
You're welcome and hope you enjoy the challenge! 😉
29th Sep 2017, 4:08 PM
Zephyr Koo
Zephyr Koo - avatar
+ 6
my result: 120 has count of 16 divisors. But thruth result: 7560 has count of 64 divisors.
29th Sep 2017, 2:31 PM
Podretyz
Podretyz - avatar
+ 6
Thanks you, Zephyr Koo :)
29th Sep 2017, 4:04 PM
Podretyz
Podretyz - avatar
+ 4
Tell me the number for which you are getting wrong.
29th Sep 2017, 2:26 PM
Kartikey Sahu
Kartikey Sahu - avatar