You are viewing a single comment's thread. Return to all comments →
n=int(input()) sum=0 for i in range(11,10**n): nfinal=str(i)[-1]+str(i)[0:len(str(i))-1] if(int(nfinal)%i==0): sum+=i print(sum%(10**5))
i am getting timeout error being my code so short. please help anuone
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #168: Number Rotations
You are viewing a single comment's thread. Return to all comments →
n=int(input()) sum=0 for i in range(11,10**n): nfinal=str(i)[-1]+str(i)[0:len(str(i))-1] if(int(nfinal)%i==0): sum+=i print(sum%(10**5))
i am getting timeout error being my code so short. please help anuone