You are viewing a single comment's thread. Return to all comments →
managed to pass test case #1 through #10
table = [x for x in range(1000001)] i = 2 while(i <= len(table)//2): j = 2*i while(j < len(table)): table[j] = table[j]*i #print(i,j) j = j+i i = i + 1 lookup = dict() for n, x in enumerate(table): #print(i ,end=" ") lookup[x] = n T = int(input()) while T > 0: X = int(input()) try: print(lookup[X]) except: print(-1) T = T -1
Seems like cookies are disabled on this browser, please enable them to open this website
Professor Numerico and the Divisors
You are viewing a single comment's thread. Return to all comments →
managed to pass test case #1 through #10