You are viewing a single comment's thread. Return to all comments →
100 points/- python3
item=input().split() n,k=int(item[0]),int(item[1]) def ispermuted(n,n_): n=str(n) n_=str(n_) if sorted(n)==sorted(n_): return True else: return False for i in range(1,n+1): if all([ispermuted(i,i*j) for j in range(2,k+1)]): print(*[i*j for j in range(1,k+1)])
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #52: Permuted multiples
You are viewing a single comment's thread. Return to all comments →
100 points/- python3