You are viewing a single comment's thread. Return to all comments →
please suggest improvements.....can only pass 0 and 1st cases
i=0; cubes=[] n,k=map(int,input().split(' ',1)) while(1): cube=sorted(list(str(i**3))) cubes.append(cube) if(cubes.count(cube)==k): print(pow(cubes.index(cube),3)) break i=i+1
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #62: Cubic permutations
You are viewing a single comment's thread. Return to all comments →
please suggest improvements.....can only pass 0 and 1st cases