Project Euler #168: Number Rotations

  • + 1 comment

    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