You are viewing a single comment's thread. Return to all comments →
100 points.
digits={9: list('123456789'), 8: list('12345678')} n,k=map(int,input().strip().split()) for i in range(2,n): value=i s='' for j in range(1,k+1): value=i*j s+=str(value) if list(s)!=list(dict.fromkeys(list(s))): break if sorted(list(s))==digits[k]: print(i) break
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #38: Pandigital multiples
You are viewing a single comment's thread. Return to all comments →
100 points.