My Program is correct but still one test cases is getting failed

My Program is correct but still one test cases is getting failed.

Don’t use the pow function because it can lead to overflow so instead calculate power using a loop and if it exceeds n then break.
10^8 now if u try to compute power(10^8,10) then this will lead to overflow

Also add case for k==1 simply print n so that u can start high with square root(Highest N value)