This function receives l and r representing the indices and prs the required output
def query ( l , r ) : NEW_LINE INDENT if ( ( sum [ r + 1 ] - sum [ l ] ) % 3 == 0 ) : NEW_LINE INDENT print ( " Divisible ▁ by ▁ 3" ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Not ▁ divisible ▁ by ▁ 3" ) NEW_LINE DEDENT DEDENT