Divide current array element until it reduces to 1
while ( res ) : NEW_LINE if res in mp : NEW_LINE INDENT mp [ res ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT mp [ res ] = 1 NEW_LINE DEDENT res //= 2 NEW_LINE INDENT mx = 1 NEW_LINE DEDENT