Initialising the array with zeros . You can do using memset too .
for i in range ( a , b + 1 ) : NEW_LINE INDENT for j in range ( b , c + 1 ) : NEW_LINE INDENT arr [ i + j ] += 1 ; NEW_LINE DEDENT DEDENT