To store the count of elements on the left that the current element divides
cnt = 0 NEW_LINE for j in range ( i ) : NEW_LINE INDENT if ( A [ j ] % A [ i ] == 0 ) : NEW_LINE INDENT cnt += 1 NEW_LINE DEDENT DEDENT B [ i ] = cnt NEW_LINE