We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
to store all 9 values in array is better then recalculate every time...
importmathsonuc=[]fak=[math.factorial(x)forxinrange(0,10)]foriinrange(10,int(input())):sum=0forainstr(i):sum=sum+fak[int(a)]#print(sum, i )if(sum%i==0):sonuc.append(int(i))s=0for_insonuc:s=s+_print(s)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #34: Digit factorials
You are viewing a single comment's thread. Return to all comments →
check mine.
to store all 9 values in array is better then recalculate every time...