Vivek and factors wa

can someone help me with my solution to this problem?
please correct my approach

code id : https://ide.codingblocks.com/s/240247

@mohitbiddu1 hey have corrected your code,made few changes see this:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Hey, Rishabh, what are we doing at line number 42. What is the need of exponent there?