Hey i dont know why my program is showing tle
Program showing TLE
Hey @jaiswaldhruv007
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.
say 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 sqrt(Highest N value) ==10^8 here
sorry didn’t understand this part Also add case for k==1 simply print n so that u can start high with sqrt(Highest N value) ==10^8 here
See this code for reference