Here y is added twice in the last iteration so 1 y should be decremented to get correct solution
if ( y * y == n and y > b ) : NEW_LINE INDENT count = count - 1 NEW_LINE DEDENT print ( count ) NEW_LINE