For each number i we will go to each of the multiple of i and update the count of divisor of its multiple j as i is one of the factor of j
for i in range ( 1 , N ) : NEW_LINE INDENT for j in range ( i , N , i ) : NEW_LINE INDENT divi [ j ] += 1 ; NEW_LINE DEDENT DEDENT