{"task_id": "HumanEval/0", "problem": [[0.9196977019309998, "    for i in range(len(list_of_numbers)):\n        for j in range(i + 1, len(list_of_numbers)):\n            if abs(list_of_numbers[i] - list_of_numbers[j]) < threshold:\n                return True"], [0.9194197654724121, "    for i in range(len(list_of_numbers)):\n        for j in range(i + 1, len(list_of_numbers)):\n            if abs(list_of_numbers[i] - list_of_numbers[j]) < threshold:\n                return True\n    return False"], [0.9086583256721497, "        for j in range(i + 1, len(list_of_numbers)):\n            if abs(list_of_numbers[i] - list_of_numbers[j]) < threshold:\n                return True"], [0.9011155366897583, "            if abs(list_of_numbers[i] - list_of_numbers[j]) < threshold:\n                return True"], [0.8931774497032166, "    length = len(nums)\n    for i in range(length - 1):\n        for j in range(i + 1, length):\n            if abs(nums[i] - nums[j]) < threshold:\n                return True\n    return False"], [0.8910671472549438, "    for i in range(length - 1):\n        for j in range(i + 1, length):\n            if abs(nums[i] - nums[j]) < threshold:\n                return True"], [0.8813287019729614, "    for i in range(len(arr) - 1):\n        if abs(arr[i] - arr[i + 1]) > threshold:\n            return True"], [0.8810958862304688, "    for i in range(len(arr) - 1):\n        if abs(arr[i] - arr[i + 1]) > threshold:\n            return True\n    return False"], [0.8808964490890503, "        for j in range(i + 1, length):\n            if abs(nums[i] - nums[j]) < threshold:\n                return True"], [0.8786838054656982, "    return math.fabs(a - b) < threshold"]]}
{"task_id": "HumanEval/1", "problem": [[0.9264861941337585, "    paren_string = paren_string.replace(' ', '')\n    parentheses_groups = []\n    stack = []\n    start = 0\n    for i, char in enumerate(paren_string):\n        if char == '(':\n            if not stack:\n                start = i\n            stack.append(char)\n        elif char == ')':\n            stack.pop()\n            if not stack:\n                parentheses_groups.append(paren_string[start:i + 1])\n    return parentheses_groups"], [0.9259897470474243, "    stack = []\n    group = []\n    result = []\n    for char in paren_string:\n        if char == ' ':\n            continue\n        if char == '(':\n            stack.append(char)\n            group.append(char)\n        if char == ')':\n            stack.pop()\n            group.append(char)\n            if not stack:\n                result.append(''.join(group))\n                group = []\n    return result"], [0.9240838289260864, "    paren_string = paren_string.replace(' ', '')\n    groups = []\n    start = 0\n    bal = 0\n    for i in range(len(paren_string)):\n        if paren_string[i] == '(':\n            bal += 1\n        else:\n            bal -= 1\n        if bal == 0:\n            groups.append(paren_string[start:i + 1])\n            start = i + 1\n    return groups"], [0.9173109531402588, "    stack = []\n    groups = []\n    group = ''\n    for ch in paren_string.replace(' ', ''):\n        if ch in ['(', '{', '[']:\n            if stack:\n                group += ch\n            stack.append(ch)\n        elif ch in [')', '}', ']']:\n            group += ch\n            stack.pop()\n            if not stack:\n                groups.append(group)\n                group = ''\n    return groups"], [0.9165716171264648, "    paren_string = paren_string.replace(' ', '')\n    stack_p = []\n    stack_s = []\n    result = []\n    inner_result = []\n    begin_index = 0\n    for idx, char in enumerate(paren_string):\n        if char == '(':\n            stack_p.append(idx)\n        elif char == '[':\n            stack_s.append(idx)\n        elif char == ')':\n            start = stack_p.pop()\n            if len(stack_p) == 0:\n                result.append(paren_string[start:idx + 1])\n                if inner_paren:\n                    inner_result += separate_paren_groups(paren_string[start + 1:idx], inner_paren)\n        elif char == ']':\n            start = stack_s.pop()\n            if len(stack_s) == 0:\n                result.append(paren_string[start:idx + 1])\n                if inner_paren:\n                    inner_result += separate_paren_groups(paren_string[start + 1:idx], inner_paren)\n    return result + inner_result"], [0.9153119325637817, "    for i in range(len(paren_string)):\n        if paren_string[i] == '(':\n            bal += 1\n        else:\n            bal -= 1\n        if bal == 0:\n            groups.append(paren_string[start:i + 1])\n            start = i + 1"], [0.9149876832962036, "    for char in paren_string:\n        if char == ' ':\n            continue\n        if char == '(':\n            stack.append(char)\n            group.append(char)\n        if char == ')':\n            stack.pop()\n            group.append(char)\n            if not stack:\n                result.append(''.join(group))\n                group = []"], [0.9136440753936768, "    replacements = {'(': ' ( ', ')': ' ) ', '[': ' [ ', ']': ' ] ', '{': ' { ', '}': ' } '}\n    for old, new in replacements.items():\n        paren_string = paren_string.replace(old, new)\n    words = paren_string.split()\n    stack = []\n    groups = []\n    for word in words:\n        if word in '([{':\n            stack.append([word])\n        else:\n            opener = {'(': ')', '[': ']', '{': '}'}[stack[-1][-1]]\n            if word != opener:\n                stack.append([])\n            stack[-1].append(word)\n            if len(stack[-1]) % 2 == 0:\n                groups.append(''.join(stack.pop()))\n    return groups"], [0.9135307669639587, "    paren_string = paren_string.replace(' ', '')\n    start = ['(', '{', '[']\n    end = [')', '}', ']']\n    groups = []\n    temp_string = ''\n    counter = 0\n    for char in paren_string:\n        if char in start:\n            counter += 1\n            temp_string += char\n        elif char in end:\n            counter -= 1\n            temp_string += char\n            if counter == 0:\n                groups.append(temp_string)\n                temp_string = ''\n    return groups"], [0.9131929874420166, "    for i, char in enumerate(paren_string):\n        if char == '(':\n            if not stack:\n                start = i\n            stack.append(char)\n        elif char == ')':\n            stack.pop()\n            if not stack:\n                parentheses_groups.append(paren_string[start:i + 1])"]]}
{"task_id": "HumanEval/2", "problem": [[0.9013906121253967, "    str_num = str(number)\n    decimal_index = str_num.index('.')\n    rightmost_int = int(str_num[decimal_index - 1])\n    return rightmost_int"], [0.897246241569519, "    decimal_point = Decimal(10) ** (-precision)\n    if isinstance(number, (int, float)):\n        number = Decimal(number)\n    elif isinstance(number, str):\n        number = Decimal(number.replace(',', '.'))\n    return float(number.quantize(decimal_point, rounding=ROUND_DOWN))"], [0.8963929414749146, "    string_num = str(number)\n    point_position = string_num.find('.')\n    if point_position == -1:\n        return None\n    integer_part = string_num[:point_position]\n    return int(integer_part[-1]) if integer_part else None"], [0.8923089504241943, "    str_num = str(number)\n    if '.' in str_num:\n        return len(str_num.split('.')[1])\n    else:\n        return 0"], [0.8888043165206909, "    try:\n        float(number)\n        return math.floor(number)\n    except (TypeError, ValueError):\n        raise ValueError('Input should be integer or float.')"], [0.8888043165206909, "    try:\n        float(number)\n        return math.floor(number)\n    except (TypeError, ValueError):\n        raise ValueError('Input should be integer or float.')"], [0.8876314163208008, "    try:\n        if not isinstance(number, (float, int)):\n            return 'Error: Invalid input.'\n        if abs(number) > 1.7e+308:\n            return 'Error: Number too large.'\n        return int(number // 1) if number >= 0 else int(number // 1) - 1\n    except TypeError:\n        return 'Error: Invalid input.'\n    except OverflowError:\n        return 'Error: Number too large.'"], [0.8876314163208008, "    try:\n        if not isinstance(number, (float, int)):\n            return 'Error: Invalid input.'\n        if abs(number) > 1.7e+308:\n            return 'Error: Number too large.'\n        return int(number // 1) if number >= 0 else int(number // 1) - 1\n    except TypeError:\n        return 'Error: Invalid input.'\n    except OverflowError:\n        return 'Error: Number too large.'"], [0.8875594139099121, "    elif fractional_part == 0.5:\n        return integer_part if integer_part > 0 else integer_part + 1\n    else:\n        return integer_part + 1 if integer_part > 0 else integer_part - 1"], [0.8874699473381042, "    if fractional_part < 0.5:\n        return integer_part\n    elif fractional_part == 0.5:\n        return integer_part if integer_part > 0 else integer_part + 1\n    else:\n        return integer_part + 1 if integer_part > 0 else integer_part - 1"]]}
{"task_id": "HumanEval/3", "problem": []}
{"task_id": "HumanEval/4", "problem": [[0.9397933483123779, "    mean = sum(numbers) / len(numbers)\n    differences = [abs(number - mean) for number in numbers]\n    mad = sum(differences) / len(numbers)\n    return mad"], [0.9350194931030273, "    median_value = statistics.median(numbers)\n    absolute_deviations = []\n    for num in numbers:\n        absolute_deviations.append(abs(num - median_value))\n    mad = statistics.median(absolute_deviations)\n    return mad"], [0.9128458499908447, "    n = len(numbers)\n    mean = sum(numbers) / n\n    squared_diff_sum = sum(((x - mean) ** 2 for x in numbers))\n    variance = squared_diff_sum / n\n    standard_deviation = variance ** 0.5\n    return standard_deviation"], [0.9125761985778809, "    n = len(numbers)\n    mean = sum(numbers) / n\n    squared_differences = [(x - mean) ** 2 for x in numbers]\n    sum_squared_differences = sum(squared_differences)\n    variance = sum_squared_differences / n\n    standard_deviation = variance ** 0.5\n    return standard_deviation"], [0.9118233323097229, "    return sum((abs(num - mean) for num in input_numbers)) / len(input_numbers)"], [0.9067452549934387, "    mean = sum(numbers) / len(numbers)\n    sum_of_squared_differences = sum([(number - mean) ** 2 for number in numbers])\n    variance = sum_of_squared_differences / len(numbers)\n    standard_deviation = math.sqrt(variance)\n    return standard_deviation"], [0.9063742756843567, "    n = len(numbers)\n    mean = sum(numbers) / n\n    squared_differences = [(x - mean) ** 2 for x in numbers]\n    variance = sum(squared_differences) / (n - 1)\n    standard_deviation = math.sqrt(variance)\n    return standard_deviation"], [0.9058593511581421, "    mean = sum(numbers) / len(numbers)\n    squared_differences = [(num - mean) ** 2 for num in numbers]\n    variance = sum(squared_differences) / len(numbers)\n    return variance ** 0.5"], [0.9054774045944214, "    median = np.median(numbers)\n    mad = np.median(np.abs(numbers - median))\n    threshold = 3.5 * mad\n    filtered_numbers = [x for x in numbers if abs(x - median) < threshold]\n    return np.mean(filtered_numbers)"], [0.904514491558075, "    average = sum(numbers) / len(numbers)\n    sum_of_square_diffs = sum(((num - average) ** 2 for num in numbers))\n    variance = sum_of_square_diffs / len(numbers)\n    return math.sqrt(variance)"]]}
{"task_id": "HumanEval/5", "problem": [[0.9449357390403748, "    if not numbers:\n        return []\n    if delimeter > 0:\n        interspersed_numbers = [numbers[0]]\n        for num in numbers[1:]:\n            interspersed_numbers.extend([delimeter, num])\n    else:\n        abs_delimeter = abs(delimeter)\n        interspersed_numbers = [numbers[0]]\n        for index, num in enumerate(numbers[1:]):\n            if (index + 1) % abs_delimeter != 0:\n                interspersed_numbers.extend([delimeter, num])\n            else:\n                interspersed_numbers.append(num)\n    return interspersed_numbers"], [0.9372299909591675, "    outcome = []\n    flattened_numbers = []\n    for num in numbers:\n        if isinstance(num, list):\n            flattened_numbers.extend(intersperse(num, delimeter))\n        else:\n            flattened_numbers.append(num)\n    for i in range(len(flattened_numbers)):\n        outcome.append(flattened_numbers[i])\n        if i < len(flattened_numbers) - 1 and isinstance(delimeter, int) and (delimeter >= 0):\n            outcome.append(delimeter)\n    return outcome"]]}
{"task_id": "HumanEval/6", "problem": [[0.9246196746826172, "    depths = []\n    paren_groups = paren_string.split(' ')\n    for paren_group in paren_groups:\n        current_depth = 0\n        max_depth = 0\n        for i in range(len(paren_group)):\n            if paren_group[i] == '(':\n                current_depth += 1\n                if current_depth > max_depth:\n                    max_depth = current_depth\n            elif paren_group[i] == ')':\n                current_depth -= 1\n        depths.append(max_depth)\n    return depths"], [0.9205356240272522, "    result = []\n    for group in s.split(' '):\n        count, max_count = (0, 0)\n        for ch in group:\n            if ch == '(':\n                count += 1\n                max_count = max(max_count, count)\n            elif ch == ')':\n                count -= 1\n        result.append(max_count)\n    return result"], [0.920148491859436, "    groups = s.split()\n    depths = []\n    for group in groups:\n        if not isValid(group):\n            raise Exception('Invalid group of parentheses in input string: ' + group)\n        depth = 0\n        max_depth = 0\n        for char in group:\n            if char == '(':\n                depth += 1\n                if depth > max_depth:\n                    max_depth = depth\n            elif char == ')':\n                depth -= 1\n        depths.append(max_depth)\n    return depths"], [0.9145045876502991, "    for group in s.split(' '):\n        count, max_count = (0, 0)\n        for ch in group:\n            if ch == '(':\n                count += 1\n                max_count = max(max_count, count)\n            elif ch == ')':\n                count -= 1\n        result.append(max_count)"], [0.9104483127593994, "    for paren_group in paren_groups:\n        current_depth = 0\n        max_depth = 0\n        for i in range(len(paren_group)):\n            if paren_group[i] == '(':\n                current_depth += 1\n                if current_depth > max_depth:\n                    max_depth = current_depth\n            elif paren_group[i] == ')':\n                current_depth -= 1\n        depths.append(max_depth)"], [0.904771089553833, "    for group in groups:\n        if not isValid(group):\n            raise Exception('Invalid group of parentheses in input string: ' + group)\n        depth = 0\n        max_depth = 0\n        for char in group:\n            if char == '(':\n                depth += 1\n                if depth > max_depth:\n                    max_depth = depth\n            elif char == ')':\n                depth -= 1\n        depths.append(max_depth)"], [0.9047365188598633, "    paren_string = paren_string.replace(' ', '')\n    parentheses_groups = []\n    stack = []\n    start = 0\n    for i, char in enumerate(paren_string):\n        if char == '(':\n            if not stack:\n                start = i\n            stack.append(char)\n        elif char == ')':\n            stack.pop()\n            if not stack:\n                parentheses_groups.append(paren_string[start:i + 1])\n    return parentheses_groups"], [0.9024267792701721, "        for i in range(len(paren_group)):\n            if paren_group[i] == '(':\n                current_depth += 1\n                if current_depth > max_depth:\n                    max_depth = current_depth\n            elif paren_group[i] == ')':\n                current_depth -= 1"], [0.8962388038635254, "            if paren_group[i] == '(':\n                current_depth += 1\n                if current_depth > max_depth:\n                    max_depth = current_depth\n            elif paren_group[i] == ')':\n                current_depth -= 1"], [0.8955767750740051, "    stack = []\n    group = []\n    result = []\n    for char in paren_string:\n        if char == ' ':\n            continue\n        if char == '(':\n            stack.append(char)\n            group.append(char)\n        if char == ')':\n            stack.pop()\n            group.append(char)\n            if not stack:\n                result.append(''.join(group))\n                group = []\n    return result"]]}
{"task_id": "HumanEval/7", "problem": [[0.9299337863922119, "    filtered_list = []\n    for string in string_list:\n        if substring in string:\n            filtered_list.append(string)\n    return filtered_list"], [0.9299237728118896, "    filtered_list = []\n    for string in string_list:\n        if substring in string:\n            filtered_list.append(string)\n    return filtered_list"], [0.9248831868171692, "    output = []\n    for s in strings:\n        if substring in s:\n            output.append(s)\n    return output"], [0.9241589307785034, "    result = []\n    for s in strings:\n        if substring in s:\n            result.append(s)\n    return result"], [0.9223769903182983, "    filtered_list = [s for s in string_list if substring in s]\n    return filtered_list"], [0.9217667579650879, "    filtered_lst = []\n    for string in lst:\n        if substring in string:\n            filtered_lst.append(string)\n    return filtered_lst"], [0.9214742183685303, "    for string in string_list:\n        if substring in string:\n            filtered_list.append(string)"], [0.9214686155319214, "    for string in string_list:\n        if substring in string:\n            filtered_list.append(string)"], [0.9193984866142273, "    result = []\n    for string in strings:\n        if substring in string and string not in result:\n            result.append(string)\n    return result"], [0.9193828701972961, "    matches = []\n    for string in list_of_strings:\n        if substring.lower() in string.lower():\n            matches.append(string)\n    return matches"]]}
{"task_id": "HumanEval/8", "problem": [[0.9315944910049438, "    sum_num = sum(numbers)\n    product = 1\n    for num in numbers:\n        product *= num\n    return (sum_num, product)"], [0.9301788210868835, "    total_sum = 0\n    total_product = 1\n    for number in numbers:\n        total_sum += number\n        total_product *= number\n    return (total_sum, total_product)"], [0.9190466403961182, "    if len(numbers) == 0:\n        print('List is empty.')\n        return\n    s = 0\n    p = 1\n    for num in numbers:\n        s += num\n        p *= num\n    print('The sum is:', s)\n    print('The product is:', p)"], [0.9050062298774719, "    if not lst:\n        return {'sum': 0, 'product': 0}\n    total = 1\n    for num in lst:\n        if not isinstance(num, (int, float)):\n            raise TypeError('List must contain only numbers')\n        total *= num\n    return {'sum': sum(lst), 'product': total}"], [0.9043492078781128, "    sum_res = 0\n    product_res = 1\n    if not lst:\n        return (sum_res, None)\n    for x in lst:\n        if isinstance(x, (int, float)):\n            sum_res += x\n            product_res *= x\n        else:\n            raise ValueError('List contains non-numeric values.')\n    return (sum_res, product_res)"], [0.9015790224075317, "    total_sum = sum(nums)\n    total_product = 1\n    for num in nums:\n        if num != 0:\n            total_product *= num\n    return (total_sum, total_product)"], [0.8995956182479858, "    if not arr:\n        return 'The provided list is empty.'\n    total = 0\n    product = 1\n    count = 0\n    for element in arr:\n        if not isinstance(element, (int, float)):\n            print(f'Error: {element} is not a number. Skipping this element.')\n            continue\n        total += element\n        product *= element\n        count += 1\n    if count == 0:\n        return 'There were no numeric elements in the list.'\n    average = total / count\n    return (total, product, average)"], [0.8988819122314453, "    sum_of_squares = 0\n    product_of_cubes = 1\n    for num in numbers:\n        if num % 2 == 0:\n            sum_of_squares += num * num\n        else:\n            product_of_cubes *= num * num * num\n    return (sum_of_squares, product_of_cubes)"], [0.8976455926895142, "    for number in numbers:\n        total_sum += number\n        total_product *= number"], [0.8974344730377197, "    for num in numbers:\n        if isinstance(num, (int, float, complex)):\n            if isinstance(num, complex):\n                num = num.imag\n            product *= num\n        elif isinstance(num, (set, list, tuple)):\n            product *= get_product(num)"]]}
{"task_id": "HumanEval/9", "problem": [[0.9201750159263611, "    numbers = [n for n in numbers if isinstance(n, int)]\n    if not numbers:\n        return []\n    rolling_min_max = [(numbers[0], numbers[0])]\n    for num in numbers[1:]:\n        current_max = max(num, rolling_min_max[-1][0])\n        current_min = min(num, rolling_min_max[-1][1])\n        if (current_max, current_min) != rolling_min_max[-1]:\n            rolling_min_max.append((current_max, current_min))\n    return rolling_min_max"], [0.908666729927063, "    if not numbers1 or not numbers2:\n        return ([], [])\n    max1 = numbers1[0]\n    max2 = numbers2[0]\n    rolling_max1 = [max1]\n    rolling_max2 = [max2]\n    for num in numbers1[1:]:\n        if num > max1:\n            max1 = num\n        rolling_max1.append(max1)\n    for num in numbers2[1:]:\n        if num > max2:\n            max2 = num\n        rolling_max2.append(max2)\n    return (rolling_max1, rolling_max2)"], [0.9086098670959473, "    if not numbers1 or not numbers2:\n        return ([], [])\n    max1 = numbers1[0]\n    max2 = numbers2[0]\n    rolling_max1 = [max1]\n    rolling_max2 = [max2]\n    for num in numbers1[1:]:\n        if num > max1:\n            max1 = num\n        rolling_max1.append(max1)\n    for num in numbers2[1:]:\n        if num > max2:\n            max2 = num\n        rolling_max2.append(max2)\n    return (rolling_max1, rolling_max2)"], [0.9042291641235352, "    for num in numbers1[1:]:\n        if num > max1:\n            max1 = num\n        rolling_max1.append(max1)"], [0.9042202234268188, "    for num in numbers1[1:]:\n        if num > max1:\n            max1 = num\n        rolling_max1.append(max1)"], [0.902834415435791, "    for num in numbers[1:]:\n        current_max = max(num, rolling_min_max[-1][0])\n        current_min = min(num, rolling_min_max[-1][1])\n        if (current_max, current_min) != rolling_min_max[-1]:\n            rolling_min_max.append((current_max, current_min))"], [0.9009923338890076, "    for num in numbers2[1:]:\n        if num > max2:\n            max2 = num\n        rolling_max2.append(max2)"], [0.9009866714477539, "    for num in numbers2[1:]:\n        if num > max2:\n            max2 = num\n        rolling_max2.append(max2)"], [0.8997691869735718, "    max_num = numbers[0]\n    result = [max_num]\n    for i in numbers[1:]:\n        if i > max_num:\n            max_num = i\n        result.append(max_num)\n    return result"], [0.8997573852539062, "    max_num = numbers[0]\n    result = [max_num]\n    for i in numbers[1:]:\n        if i > max_num:\n            max_num = i\n        result.append(max_num)\n    return result"]]}
{"task_id": "HumanEval/10", "problem": [[0.9333310127258301, "    palindrome_substr = longest_palindromic_postfix(string)\n    prefix = string[:len(string) - len(palindrome_substr)]\n    palindrome = string + prefix[::-1]\n    return palindrome"], [0.9333086609840393, "    palindrome_substr = longest_palindromic_postfix(string)\n    prefix = string[:len(string) - len(palindrome_substr)]\n    palindrome = string + prefix[::-1]\n    return palindrome"], [0.9299436807632446, "    string = ''.join(filter(str.isalnum, string.lower()))\n    prefix = ''.join(filter(str.isalnum, prefix.lower()))\n    suffix = ''.join(filter(str.isalnum, suffix.lower()))\n    string = prefix + string + suffix\n    postfix = longest_palindrome_postfix(string)\n    prefix_to_mirror = string[:-len(postfix)] if postfix else string\n    return string + prefix_to_mirror[::-1]"], [0.9281924962997437, "    palindromic_postfix = longest_palindromic_postfix(string)\n    prefix = string[0:len(string) - len(palindromic_postfix)]\n    return string + prefix[::-1]"], [0.9281749725341797, "    palindromic_postfix = longest_palindromic_postfix(string)\n    prefix = string[0:len(string) - len(palindromic_postfix)]\n    return string + prefix[::-1]"], [0.9258687496185303, "    string = ''.join((ch for ch in string if ch.isalnum())).lower()\n    for i in range(len(string)):\n        if is_palindrome(string[i:]):\n            return string + string[:i][::-1]\n    return ''"]]}
{"task_id": "HumanEval/11", "problem": [[0.9333575963973999, "    result = []\n    for i in range(len(a)):\n        bit_a = int(a[i])\n        bit_b = int(b[i])\n        xor_result = bit_a ^ bit_b\n        result.append(str(xor_result))\n    return result"], [0.9294401407241821, "    n = max(len(num1), len(num2))\n    num1 = num1.zfill(n)\n    num2 = num2.zfill(n)\n    num1 = int(num1, 2)\n    num2 = int(num2, 2)\n    xor_result = num1 ^ num2\n    xor_binary = bin(xor_result)[2:].zfill(n)\n    xor_list = [int(bit) for bit in xor_binary]\n    return xor_list"], [0.9267842769622803, "    xor_result = int(a, 2) ^ int(b, 2)\n    xor_result_str = format(xor_result, 'b').zfill(len(a))\n    return xor_result_str"], [0.9255679249763489, "    a_int = int(a, 2)\n    b_int = int(b, 2)\n    xor_result = a_int ^ b_int\n    return format(xor_result, 'b')"], [0.9254258871078491, "    for i in range(len(a)):\n        bit_a = int(a[i])\n        bit_b = int(b[i])\n        xor_result = bit_a ^ bit_b\n        result.append(str(xor_result))"], [0.9234309196472168, "    xor_result = bin(int(a, 2) ^ int(b, 2))[2:]\n    res = xor_result[0]\n    for x in xor_result[1:]:\n        if x != res[-1]:\n            res += x\n    return res"], [0.9189093708992004, "    for i in range(len(a)):\n        xor_result += str(int(a[i]) ^ int(b[i]))"], [0.9189092516899109, "    for i in range(len(a)):\n        xor_result += str(int(a[i]) ^ int(b[i]))"], [0.9188973903656006, "    for i in range(len(a)):\n        xor_result += str(int(a[i]) ^ int(b[i]))"], [0.9188896417617798, "    for i in range(len(a)):\n        xor_result += str(int(a[i]) ^ int(b[i]))"]]}
{"task_id": "HumanEval/12", "problem": [[0.9278738498687744, "    if not strings:\n        return None\n    longest_string = strings[0]\n    for string in strings:\n        if len(string) > len(longest_string):\n            longest_string = string\n    return longest_string"], [0.927869439125061, "    if not strings:\n        return None\n    longest_string = strings[0]\n    for string in strings:\n        if len(string) > len(longest_string):\n            longest_string = string\n    return longest_string"], [0.9226057529449463, "    if not strings:\n        return None\n    else:\n        max_length = len(max(strings, key=len))\n        for string in strings:\n            if len(string) == max_length:\n                return string"], [0.9226057529449463, "    if not strings:\n        return None\n    else:\n        max_length = len(max(strings, key=len))\n        for string in strings:\n            if len(string) == max_length:\n                return string"], [0.9222418665885925, "    if not strings:\n        return None\n    return max(strings, key=len)"], [0.922233521938324, "    if not strings:\n        return None\n    return max(strings, key=len)"], [0.9210304021835327, "    if strings is None:\n        return None\n    if not isinstance(strings, list):\n        raise NotAListError('Input is not a list')\n    max_length = -1\n    longest_str = None\n    for string in strings:\n        if len(string) > max_length:\n            max_length = len(string)\n            longest_str = string\n    return longest_str"], [0.9201749563217163, "    if not strings:\n        return None\n    else:\n        return max(strings, key=len)"], [0.9201749563217163, "    if not strings:\n        return None\n    else:\n        return max(strings, key=len)"], [0.919323205947876, "    longest_string = None\n    max_length = 0\n    for string in strings:\n        if len(string) > max_length:\n            longest_string = string\n            max_length = len(string)\n    return longest_string"]]}
{"task_id": "HumanEval/13", "problem": [[0.9368824362754822, "    if b == 0:\n        return a\n    return greatest_common_divisor(b, a % b)"], [0.9368740320205688, "    if b == 0:\n        return a\n    return greatest_common_divisor(b, a % b)"]]}
{"task_id": "HumanEval/14", "problem": [[0.9048323631286621, "    substrings = []\n    for i in range(len(string)):\n        current_substring = ''\n        for j in range(i, len(string)):\n            current_substring += string[j]\n            substrings.append(current_substring)\n    return substrings"], [0.9033101201057434, "    substrings = set()\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.add(string[i:j])\n    return sorted(list(substrings))"], [0.9016103148460388, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i, len(string)):\n            substring = string[i:j + 1]\n            substrings.append(substring)\n    substrings.sort()\n    return substrings"], [0.9007095098495483, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i, len(string)):\n            substrings.append(string[i:j + 1])\n    return substrings"], [0.8981368541717529, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"], [0.8981330394744873, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"], [0.8981279134750366, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"], [0.8981267213821411, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"], [0.8981219530105591, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"], [0.8981031179428101, "    substrings = []\n    for i in range(len(string)):\n        for j in range(i + 1, len(string) + 1):\n            substrings.append(string[i:j])\n    return substrings"]]}
{"task_id": "HumanEval/15", "problem": [[0.9186404347419739, "    sequence = []\n    for i in range(n + 1):\n        sequence.append(str(i))\n    return ' '.join(sequence)"], [0.8928039073944092, "    for i in range(n + 1):\n        sequence.append(str(i))"], [0.8924891948699951, "    assert generate_sequence(5) == [1, 2, 3, 4, 5]\n    assert generate_sequence(10) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n    assert generate_sequence(3) == [1, 2, 3]"], [0.8918759822845459, "    sequence = []\n    for i in range(0, n + 1):\n        sequence.append(i)\n    return sequence"], [0.8918759822845459, "    sequence = []\n    for i in range(0, n + 1):\n        sequence.append(i)\n    return sequence"], [0.887938380241394, "    if n < 0:\n        print('Error: Negative input.')\n        return\n    elif n == 0:\n        print(0)\n        return\n    else:\n        print_sequence(n - 1)\n        print(n)"], [0.887938380241394, "    if n < 0:\n        print('Error: Negative input.')\n        return\n    elif n == 0:\n        print(0)\n        return\n    else:\n        print_sequence(n - 1)\n        print(n)"], [0.8879295587539673, "    if n < 0:\n        print('Error: Negative input.')\n        return\n    elif n == 0:\n        print(0)\n        return\n    else:\n        print_sequence(n - 1)\n        print(n)"], [0.8879295587539673, "    if n < 0:\n        print('Error: Negative input.')\n        return\n    elif n == 0:\n        print(0)\n        return\n    else:\n        print_sequence(n - 1)\n        print(n)"], [0.8871281147003174, "    try:\n        if 0 <= n <= 10 ** 9:\n            return ''.join((str(i) for i in range(n + 1)))\n        else:\n            return 'Input must be a non-negative integer no greater than 10^9'\n    except TypeError:\n        return 'Input must be an integer'"]]}
{"task_id": "HumanEval/16", "problem": [[0.9291220307350159, "    distinct_characters = set(string)\n    return len(distinct_characters)"], [0.925786018371582, "    distinct_letters = set()\n    for char in string:\n        if char.islower():\n            distinct_letters.add(char)\n    return len(distinct_letters)"], [0.923970103263855, "    distinct_chars = set(string)\n    return len(distinct_chars)"], [0.9191524982452393, "    characters = set()\n    for char in string:\n        characters.add(char)\n    return len(characters)"], [0.9163897037506104, "    distinct_words = set()\n    words = string.split()\n    for word in words:\n        distinct_words.add(word.lower())\n    return len(distinct_words)"], [0.9157619476318359, "    unique_characters = set(string.lower().replace(' ', ''))\n    return len(unique_characters)"], [0.9121776223182678, "    words = string.split()\n    distinct_words = set(words)\n    return len(distinct_words)"], [0.9119484424591064, "    seen_chars = set()\n    count = 0\n    for char in string:\n        if char not in seen_chars:\n            seen_chars.add(char)\n            count += 1\n    return count"], [0.9104049205780029, "    unique_chars = []\n    count = 0\n    for char in string:\n        if char not in unique_chars:\n            count += 1\n            unique_chars.append(char)\n    return count"], [0.9102634191513062, "    unique_chars = set(string)\n    return len(unique_chars)"]]}
{"task_id": "HumanEval/17", "problem": [[0.9394757747650146, "    notes_map = {'o': 4, 'o|': 2, '.|': 1}\n    notes = music_string.split()\n    beats = [notes_map[note] for note in notes]\n    return beats"], [0.9375298619270325, "    notes = music_string.split(' ')\n    beat_duration = []\n    for note in notes:\n        if note == 'o':\n            beat_duration.append(4)\n        elif note == 'o|':\n            beat_duration.append(2)\n        elif note == '.|':\n            beat_duration.append(1)\n    return beat_duration"], [0.9186577796936035, "        if note == 'o':\n            beat_duration.append(4)\n        elif note == 'o|':\n            beat_duration.append(2)\n        elif note == '.|':\n            beat_duration.append(1)"], [0.91819167137146, "    for note in notes:\n        if note == 'o':\n            beat_duration.append(4)\n        elif note == 'o|':\n            beat_duration.append(2)\n        elif note == '.|':\n            beat_duration.append(1)"], [0.9113762378692627, "        elif note == 'o|':\n            beat_duration.append(2)\n        elif note == '.|':\n            beat_duration.append(1)"], [0.8948849439620972, "        elif note == '.|':\n            beat_duration.append(1)"], [0.8939126133918762, "    beats = []\n    measure = []\n    total_beats = 0\n    measures_count = 0\n    notes = music_string.split()\n    for note in notes:\n        note_value = NOTE_VALUES[note] * tempo_multiplier\n        if total_beats + note_value > 1:\n            beats.append(measure)\n            measure = []\n            total_beats = 0\n            measures_count += 1\n        measure.append(note_value)\n        total_beats += note_value\n    if measure:\n        beats.append(measure)\n        measures_count += 1\n    return (beats, measures_count)"], [0.893900990486145, "    beats = []\n    measure = []\n    total_beats = 0\n    measures_count = 0\n    notes = music_string.split()\n    for note in notes:\n        note_value = NOTE_VALUES[note] * tempo_multiplier\n        if total_beats + note_value > 1:\n            beats.append(measure)\n            measure = []\n            total_beats = 0\n            measures_count += 1\n        measure.append(note_value)\n        total_beats += note_value\n    if measure:\n        beats.append(measure)\n        measures_count += 1\n    return (beats, measures_count)"], [0.8897483348846436, "    if not 0 <= BPM <= 300:\n        raise Exception('BPM should be between 0 and 300')\n    music_notes = music_string.split(' ')\n    transposed_notes = []\n    for note in music_notes:\n        beats_per_note = 4 if note == 'o' else 2 if note == 'o|' else 1\n        transpose_val = 70 + BPM // 10 * beats_per_note\n        transposed_notes.append(transpose_val)\n    return transposed_notes"], [0.878284215927124, "    for note in music_notes:\n        beats_per_note = 4 if note == 'o' else 2 if note == 'o|' else 1\n        transpose_val = 70 + BPM // 10 * beats_per_note\n        transposed_notes.append(transpose_val)"]]}
{"task_id": "HumanEval/18", "problem": [[0.9265977144241333, "    count, last_idx = (0, -1)\n    while True:\n        last_idx = string.find(substring, last_idx + 1)\n        if last_idx != -1:\n            count += 1\n        else:\n            break\n    return count"], [0.9265834093093872, "    count, last_idx = (0, -1)\n    while True:\n        last_idx = string.find(substring, last_idx + 1)\n        if last_idx != -1:\n            count += 1\n        else:\n            break\n    return count"], [0.920912504196167, "    subsequence_indices = [i for i in range(len(string)) if string[i:].startswith(substring)]\n    subsequence_count = 0\n    subsequence_positions = []\n    for i in range(len(subsequence_indices)):\n        if subsequence_indices[i] not in range(subsequence_indices[i - 1], subsequence_indices[i - 1] + len(substring)):\n            subsequence_count += 1\n            subsequence_positions.append(subsequence_indices[i])\n    return (subsequence_count, subsequence_positions)"]]}
{"task_id": "HumanEval/19", "problem": [[0.9015886187553406, "    num2words = {1: 'One', 2: 'Two', 3: 'Three', 4: 'Four', 5: 'Five', 6: 'Six', 7: 'Seven', 8: 'Eight', 9: 'Nine'}\n    valid_nums = sorted([n for n in arr if 1 <= n <= 9], reverse=True)\n    return [num2words[n] for n in valid_nums]"], [0.8966484069824219, "    numbers = re.findall('\\\\d+', string)\n    numbers_greater_than_5 = [int(num) for num in numbers if int(num) > 5]\n    numbers_greater_than_5.sort(reverse=True)\n    return numbers_greater_than_5"], [0.8950948715209961, "    return sorted(numbers, key=lambda x: int(str(x)[0]), reverse=True)"], [0.8943517804145813, "    numbers = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine'}\n    number_string = ''\n    while num != 0:\n        digit = num % 10\n        number_string = numbers[digit] + ' ' + number_string\n        num = num // 10\n    return number_string.strip()"], [0.8915853500366211, "    string_nums = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']\n    return string_nums[num]"], [0.8915671706199646, "    result = []\n    for num in lst:\n        try:\n            if 0 <= int(num) <= 10 and num not in result:\n                result.append(num)\n        except ValueError:\n            continue\n    return sorted(result)"], [0.8912534713745117, "    negatives, zeros, positives = ([], [], [])\n    for num in numbers:\n        if num < 0:\n            negatives.append(num)\n        elif num > 0:\n            positives.append(num)\n        else:\n            zeros.append(num)\n    negatives.sort()\n    positives.sort()\n    result = negatives + zeros + positives\n    return result"], [0.8909178972244263, "    numbers = []\n    strings = []\n    for element in arr:\n        if element.isdigit():\n            numbers.append(element)\n        else:\n            strings.append(element)\n    numbers.sort()\n    strings.sort()\n    sorted_arr = numbers + strings\n    return sorted_arr"], [0.8888164758682251, "    return sorted(arr, key=lambda s: (extract_num(s), s.lower()))"], [0.8887967467308044, "    converted_nums = []\n    for num in arr:\n        try:\n            converted_nums.append(int(num))\n        except ValueError:\n            continue\n    n = len(converted_nums)\n    for i in range(n):\n        for j in range(0, n - i - 1):\n            if converted_nums[j] < converted_nums[j + 1]:\n                converted_nums[j], converted_nums[j + 1] = (converted_nums[j + 1], converted_nums[j])\n    return converted_nums"]]}
{"task_id": "HumanEval/20", "problem": [[0.9274997115135193, "    if len(numbers) < 2:\n        raise ValueError('The provided list must contain at least two numbers.')\n    sorted_numbers = sorted(numbers)\n    min_diff = float('inf')\n    closest_pair = (None, None)\n    for i in range(len(sorted_numbers) - 1):\n        diff = sorted_numbers[i + 1] - sorted_numbers[i]\n        if diff < min_diff:\n            min_diff = diff\n            closest_pair = (sorted_numbers[i], sorted_numbers[i + 1])\n    return closest_pair"], [0.9243718981742859, "    numbers_with_indices = [(num, idx) for idx, num in enumerate(numbers)]\n    numbers_with_indices.sort()\n    num1, idx1, num2, idx2, min_distance = (None, -1, None, -1, float('inf'))\n    for i in range(1, len(numbers_with_indices)):\n        if numbers_with_indices[i][0] != numbers_with_indices[i - 1][0]:\n            distance = numbers_with_indices[i][0] - numbers_with_indices[i - 1][0]\n            if distance < min_distance:\n                num1, idx1 = numbers_with_indices[i - 1]\n                num2, idx2 = numbers_with_indices[i]\n                min_distance = distance\n    return (num1, idx1, num2, idx2)"], [0.9192315340042114, "    if not numbers:\n        return []\n    if len(numbers) < 2:\n        return []\n    if any((not isinstance(i, (int, float)) for i in numbers)):\n        raise ValueError('All elements in the list should be integers or floats.')\n    numbers.sort()\n    smallest_diff = float('inf')\n    pairs = []\n    for i in range(1, len(numbers)):\n        diff = numbers[i] - numbers[i - 1]\n        if diff < smallest_diff:\n            smallest_diff = diff\n            pairs = [(numbers[i - 1], numbers[i])]\n        elif diff == smallest_diff:\n            pairs.append((numbers[i - 1], numbers[i]))\n    return pairs"], [0.9089609384536743, "    sorted_numbers = sorted(numbers)\n    return (sorted_numbers[1], sorted_numbers[-2])"], [0.9071352481842041, "    smallest_difference = float('inf')\n    for i in range(len(numbers)):\n        for j in range(i + 1, len(numbers)):\n            difference = abs(numbers[i] - numbers[j])\n            if difference < smallest_difference:\n                smallest_difference = difference\n                smallest_pair = (min(numbers[i], numbers[j]), max(numbers[i], numbers[j]), i, j) if numbers[i] < numbers[j] else (min(numbers[i], numbers[j]), max(numbers[i], numbers[j]), j, i)\n    return smallest_pair"], [0.9069873094558716, "    for i in range(len(sorted_numbers) - 1):\n        diff = sorted_numbers[i + 1] - sorted_numbers[i]\n        if diff < min_diff:\n            min_diff = diff\n            closest_pair = (sorted_numbers[i], sorted_numbers[i + 1])"]]}
{"task_id": "HumanEval/21", "problem": [[0.9181297421455383, "    min_elem = min(numbers)\n    scale = max(numbers) - min_elem\n    for i in range(len(numbers)):\n        numbers[i] = (numbers[i] - min_elem) / scale\n    return numbers"], [0.9104619026184082, "    min_num = min(numbers)\n    max_num = max(numbers)\n    for i in range(0, len(numbers)):\n        numbers[i] = (numbers[i] - min_num) / (max_num - min_num)\n    return numbers"], [0.9029601812362671, "    max_number = max(numbers)\n    min_number = min(numbers)\n    normalized_numbers = []\n    for number in numbers:\n        if max_number - min_number == 0:\n            normalized_numbers.append(0)\n        else:\n            normalized_numbers.append((number - min_number) / (max_number - min_number))\n    return normalized_numbers"], [0.902244508266449, "    for i in range(len(numbers)):\n        numbers[i] = (numbers[i] - min_elem) / scale"], [0.8993819952011108, "    for i in range(0, len(numbers)):\n        numbers[i] = (numbers[i] - min_num) / (max_num - min_num)"], [0.8968309760093689, "    max_value = max(numbers)\n    normalized_numbers = [n / (2 * max_value) for n in numbers]\n    return normalized_numbers"], [0.8962159156799316, "    for number in numbers:\n        if max_number - min_number == 0:\n            normalized_numbers.append(0)\n        else:\n            normalized_numbers.append((number - min_number) / (max_number - min_number))"], [0.8954958915710449, "    min_n = min(nums)\n    max_n = max(nums)\n    return [(n - min_n) / (max_n - min_n) for n in nums]"], [0.894136905670166, "    max_val = max(list_numbers)\n    normalized = [n / max_val for n in list_numbers]\n    return normalized"], [0.8918997049331665, "    max_num = max(numbers)\n    min_num = min(numbers)\n    scaled_numbers = [(num - min_num) / (max_num - min_num) * target_width for num in numbers]\n    return scaled_numbers"]]}
{"task_id": "HumanEval/22", "problem": [[0.9043695330619812, "    int_list = []\n    for i in input_list:\n        if isinstance(i, int):\n            int_list.append(i)\n        else:\n            print('{} is not an integer. Ignoring...'.format(i))\n    return sorted(set(int_list))"], [0.9027715921401978, "    output_list = set()\n    for i in input_list:\n        if isinstance(i, (int, float)):\n            output_list.add(int(i))\n        elif isinstance(i, str):\n            try:\n                output_list.add(int(i))\n            except ValueError:\n                print(f'Invalid integer value: {i}')\n                continue\n    return output_list"], [0.9006220102310181, "    res = []\n    for item in my_list:\n        if type(item) == int:\n            res.append(item)\n    return res"], [0.8991385698318481, "    return [val for val in values if isinstance(val, int)]"], [0.8985050916671753, "    converted_integers = []\n    for value in args:\n        try:\n            converted_integers.append(int(value))\n        except ValueError:\n            print(f\"Error: '{value}' is not a valid integer. Skipping...\")\n    return converted_integers"], [0.896186888217926, "    unique_values = []\n    for value in list_of_integers:\n        if value not in unique_values:\n            unique_values.append(value)\n    return unique_values"], [0.8943580389022827, "    for i in input_list:\n        if isinstance(i, (int, float)):\n            output_list.add(int(i))\n        elif isinstance(i, str):\n            try:\n                output_list.add(int(i))\n            except ValueError:\n                print(f'Invalid integer value: {i}')\n                continue"], [0.89412522315979, "    result = []\n    for sublist in values:\n        for value in sublist:\n            if isinstance(value, int):\n                result.append(value)\n    return result"], [0.8916116952896118, "    list_of_integers = []\n    for string in list_of_strings:\n        list_of_integers.append(int(string))\n    return list_of_integers"]]}
{"task_id": "HumanEval/23", "problem": [[0.9189034104347229, "    length = 0\n    for c in string:\n        length += 1\n    return length"], [0.9187778234481812, "    length = 0\n    for char in string:\n        length += 1\n    return length"], [0.9187759160995483, "    length = 0\n    for char in string:\n        length += 1\n    return length"], [0.9187736511230469, "    length = 0\n    for char in string:\n        length += 1\n    return length"], [0.9135337471961975, "    len_str = 0\n    for char in str:\n        len_str += 1\n    return len_str"], [0.9117221236228943, "    length = 0\n    for i in string:\n        length = length + 1\n    return length"], [0.9071107506752014, "    return len(string)"], [0.9070959687232971, "    return len(string)"], [0.9070946574211121, "    return len(string)"], [0.9070946574211121, "    return len(string)"]]}
{"task_id": "HumanEval/24", "problem": [[0.9362852573394775, "    if n == divisor:\n        return n\n    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9362852573394775, "    if n == divisor:\n        return n\n    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9362819194793701, "    if n == divisor:\n        return n\n    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9362819194793701, "    if n == divisor:\n        return n\n    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9356512427330017, "    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9356170296669006, "    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9317411184310913, "    if n < 2:\n        return 0\n    while n % 2 == 0:\n        n = n // 2\n    largest_factor = 1\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            largest_factor = i\n            n = n // i\n    if n > 2:\n        largest_factor = n\n    return largest_factor"], [0.9288069009780884, "    n = int(abs(n))\n    if n == 1:\n        return 1\n    largest = 2\n    while n % 2 == 0:\n        n = n // 2\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            largest = i\n            n = n // i\n    if n > 2:\n        largest = n\n    return largest"], [0.9278652667999268, "    for i in range(n // 2, 0, -1):\n        if n % i == 0:\n            return i"], [0.9278470277786255, "    for i in range(n // 2, 0, -1):\n        if n % i == 0:\n            return i"]]}
{"task_id": "HumanEval/25", "problem": [[0.9254420399665833, "    if not isinstance(n, int) or n <= 1:\n        raise ValueError('Input must be an integer greater than 1')\n    prime_factors = prime_factors_sieve(n)\n    return [prime_factors[i] for i in range(2, n + 1)]"], [0.9240829944610596, "    if n == 1:\n        return []\n    factors = [1, n]\n    for i in range(2, int(n ** 0.5) + 1):\n        if n % i == 0:\n            factors.append(i)\n            if i * i != n:\n                factors.append(n / i)\n    return sorted(factors)"], [0.9239227175712585, "    factors = []\n    while n % 2 == 0:\n        factors.append(2)\n        n //= 2\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            factors.append(i)\n            n //= i\n    if n > 2:\n        factors.append(n)\n    return factors"], [0.9230512976646423, "    factors = []\n    i = 2\n    while n > 1:\n        while n % i == 0:\n            factors.append(i)\n            n /= i\n        i += 1\n    return factors"], [0.9225526452064514, "    factors = []\n    while n % 2 == 0:\n        factors.append(2)\n        n //= 2\n    for i in range(3, int(math.sqrt(n)) + 1, 2):\n        while n % i == 0:\n            factors.append(i)\n            n //= i\n    if n > 1:\n        factors.append(n)\n    return factors"], [0.922059178352356, "    factors = []\n    while n % 2 == 0:\n        factors.append(2)\n        n = n // 2\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            factors.append(i)\n            n = n // i\n    if n > 2:\n        factors.append(n)\n    return factors"], [0.9220589399337769, "    factors = []\n    while n % 2 == 0:\n        factors.append(2)\n        n = n // 2\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            factors.append(i)\n            n = n // i\n    if n > 2:\n        factors.append(n)\n    return factors"], [0.9214940667152405, "    if n <= 0:\n        return []\n    factor_list = [1]\n    for i in range(2, int(n ** 0.5) + 1):\n        if n % i == 0:\n            if n // i == i:\n                factor_list.append(i)\n            else:\n                factor_list.append(i)\n                factor_list.append(n // i)\n    factor_list.append(n)\n    return sorted(factor_list)"], [0.9213076829910278, "    prime_factors = []\n    while n % 2 == 0:\n        prime_factors.append(2)\n        n //= 2\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            prime_factors.append(i)\n            n //= i\n    if n > 2:\n        prime_factors.append(n)\n    return prime_factors"], [0.9212054014205933, "    factors = []\n    while n % 2 == 0:\n        factors.append(2)\n        n = n // 2\n    while n % 3 == 0:\n        factors.append(3)\n        n = n // 3\n    for i in range(5, int(n ** 0.5) + 1, 6):\n        while n % i == 0:\n            factors.append(i)\n            n = n // i\n        while n % (i + 2) == 0:\n            factors.append(i + 2)\n            n = n // (i + 2)\n    if n > 2:\n        factors.append(n)\n    return factors"]]}
{"task_id": "HumanEval/26", "problem": [[0.9310524463653564, "    if len(numbers) == 0:\n        return []\n    if allow_consecutive_duplicates:\n        new_length = 1\n        for i in range(1, len(numbers)):\n            if numbers[i] != numbers[new_length - 1]:\n                numbers[new_length] = numbers[i]\n                new_length += 1\n    else:\n        seen = set()\n        new_length = 0\n        for i in range(len(numbers)):\n            if numbers[i] not in seen:\n                seen.add(numbers[i])\n                numbers[new_length] = numbers[i]\n                new_length += 1\n    return numbers[:new_length]"], [0.9285057187080383, "    number_dict = {}\n    result = []\n    for i in range(len(numbers)):\n        if numbers[i] in number_dict:\n            continue\n        elif allow_consecutive_duplicates and i + 1 < len(numbers) and (numbers[i] == numbers[i + 1]):\n            number_dict[numbers[i]] = True\n        else:\n            number_dict[numbers[i]] = False\n        result.append(numbers[i])\n    return result"], [0.923786461353302, "    numbers.sort()\n    new_list = []\n    for num in numbers:\n        if num not in new_list:\n            new_list.append(num)\n    return new_list"], [0.9222785234451294, "    new_list = []\n    for number in numbers:\n        if number not in new_list:\n            new_list.append(number)\n    return new_list"], [0.9213120341300964, "    write = 1\n    for read in range(1, len(numbers)):\n        if numbers[read] != numbers[read - 1]:\n            numbers[write] = numbers[read]\n            write += 1\n    return numbers[:write]"], [0.9206469058990479, "    return list(set(numbers))"], [0.9206333160400391, "    return list(set(numbers))"], [0.9206333160400391, "    return list(set(numbers))"], [0.9206283688545227, "    return list(set(numbers))"], [0.9206283688545227, "    return list(set(numbers))"]]}
{"task_id": "HumanEval/27", "problem": [[0.9169416427612305, "    toggled_string = ''\n    for char in string:\n        if char.isalpha():\n            toggled_string += char.swapcase()\n        else:\n            toggled_string += char\n    return toggled_string"], [0.9137905836105347, "    swapped_string = ''\n    for char in string:\n        if char.islower():\n            swapped_string += char.upper()\n        elif char.isupper():\n            swapped_string += char.lower()\n        else:\n            swapped_string += char\n    return swapped_string"], [0.9125499129295349, "    for char in string:\n        if char.isalpha():\n            toggled_string += char.swapcase()\n        else:\n            toggled_string += char"], [0.9120219945907593, "    new_string = ''\n    for char in string:\n        if char.isupper():\n            new_string += char.lower()\n        else:\n            new_string += char.upper()\n    return new_string"], [0.9120078682899475, "    new_string = ''\n    for char in string:\n        if char.isupper():\n            new_string += char.lower()\n        else:\n            new_string += char.upper()\n    return new_string"], [0.910712480545044, "    if not string:\n        return ''\n    first_char = string[0]\n    if first_char.isalpha():\n        return first_char.swapcase() + change_case(string[1:])\n    else:\n        return first_char + change_case(string[1:])"], [0.9099439978599548, "    assert input_string and isinstance(input_string, str), 'Input must be a non-empty string'\n    if input_string.islower():\n        return input_string.upper()\n    elif input_string.isupper():\n        return input_string.lower()\n    else:\n        result = ''\n        for i, char in enumerate(input_string):\n            if i % 2 == 0:\n                result += char.lower()\n            else:\n                result += char.upper()\n        return result"], [0.9079713225364685, "    new_string = ''\n    for char in string:\n        if char.isupper():\n            new_string += char.lower()\n        elif char.islower():\n            new_string += char.upper()\n        else:\n            new_string += char\n    return new_string"], [0.907939076423645, "    new_string = ''\n    for char in string:\n        if char.isupper():\n            new_string += char.lower()\n        elif char.islower():\n            new_string += char.upper()\n        else:\n            new_string += char\n    return new_string"], [0.9076094627380371, "    converted_string = ''\n    for char in string:\n        if char.islower():\n            converted_string += char.upper()\n        elif char.isupper():\n            converted_string += char.lower()\n        else:\n            converted_string += char\n    return converted_string"]]}
{"task_id": "HumanEval/28", "problem": [[0.9165719747543335, "    if len(strings) == 0:\n        return ''"], [0.9165675640106201, "    if len(strings) == 0:\n        return ''"], [0.9165571928024292, "    if len(strings) == 0:\n        return ''"], [0.9165443778038025, "    if len(strings) == 0:\n        return ''"], [0.9128233790397644, "    result = ''\n    for string in strings:\n        result += string\n    return result"], [0.9102015495300293, "    result = ''\n    for string in list_of_strings:\n        result += string\n    return result"], [0.9066702127456665, "    if not strings:\n        return ''"], [0.9066702127456665, "    if not strings:\n        return ''"], [0.9066702127456665, "    if not strings:\n        return ''"], [0.9066645503044128, "    if not strings:\n        return ''"]]}
{"task_id": "HumanEval/29", "problem": [[0.9009544253349304, "    return [string for string in strings if string.startswith(prefix)]"], [0.8966149091720581, "    result = []\n    for string in strings:\n        if string.startswith(letter):\n            result.append(string)\n    return result"], [0.8938316106796265, "    return [s for s in string_list if s.startswith(prefix)]"], [0.8938199877738953, "    return [s for s in string_list if s.startswith(prefix)]"], [0.893645703792572, "    new_array = []\n    for word in array:\n        if not word.startswith(prefix):\n            new_array.append(word)\n    return new_array"], [0.8936243057250977, "    result = []\n    for string in strings:\n        if string.startswith('a'):\n            result.append(string)\n    if len(result) == 0:\n        return []\n    return result"], [0.8933694362640381, "    return list(filter(lambda s: s.startswith(char), strings))"], [0.893303394317627, "    result = []\n    characters_lower = [char.lower() for char in characters]\n    for string in strings:\n        if string[0].lower() in characters_lower:\n            result.append(string)\n    return result"], [0.8932956457138062, "    result = []\n    characters_lower = [char.lower() for char in characters]\n    for string in strings:\n        if string[0].lower() in characters_lower:\n            result.append(string)\n    return result"], [0.8892428874969482, "        for word in strings:\n            if word.startswith(string):\n                filtered_list.append(word)"]]}
{"task_id": "HumanEval/30", "problem": [[0.9304673671722412, "    input_list = [1, -2, 3, -4, 5]\n    expected_output = [1, 3, 5]\n    assert positive(input_list) == expected_output"], [0.9275839924812317, "    positive_nums = []\n    for n in lst:\n        if n > 0:\n            positive_nums.append(n)\n    return positive_nums"], [0.9220691919326782, "    positives = []\n    for num in l:\n        if num > 0:\n            positives.append(num)\n    return bubble_sort(positives)"], [0.9194426536560059, "    positive_list = []\n    for num in input_list:\n        if num > 0:\n            positive_list.append(num)\n    positive_list.sort()\n    return positive_list"], [0.9192445278167725, "    positive_nums = [num for num in l if num > 0]\n    return sorted(positive_nums)"], [0.9149878025054932, "    positive_integers = []\n    for num in input_list:\n        if num > 0:\n            positive_integers.append(num)\n    return positive_integers"], [0.9129878282546997, "    positive_nums = []\n    for num in nums:\n        if num > 0:\n            positive_nums.append(num)\n    return positive_nums"], [0.9086258411407471, "    result = []\n    for num in l:\n        if num > 0:\n            result.append(num)\n    return result"]]}
{"task_id": "HumanEval/31", "problem": []}
{"task_id": "HumanEval/32", "problem": [[0.9055863618850708, "    coefficients = coefficients[::-1]\n    try:\n        roots = np.roots(coefficients)\n    except ZeroDivisionError as e:\n        return f'Error: Division by zero. Full error - {e}'\n    for i in range(len(roots)):\n        if np.iscomplex(roots[i]):\n            return f'Warning: One or more solutions are non-real.'\n    return roots"], [0.9035755395889282, "    num_coeff = len(xs)\n    derivative = [i * xs[i] for i in range(1, num_coeff)]\n    integral = [xs[i] / (i + 1) for i in range(num_coeff)]\n    integral.insert(0, C)\n    zeros = np.roots(list(reversed(xs))).tolist()\n    return (derivative, integral, zeros)"], [0.9005577564239502, "    roots = []\n    a = np.flip(coeffs[:-1])\n    b = np.array([coeffs[-1]])\n    x = np.roots(np.append(a, b))\n    for i in range(degree):\n        roots.append((x[i], 0))\n    return roots"], [0.8949102163314819, "    result = 0\n    n = len(coefficients)\n    for i, coefficient in enumerate(coefficients):\n        result += coefficient * x ** (n - i - 1)\n    return result"], [0.8945355415344238, "    if len(xs) == 0:\n        return 'Invalid polynomial'"], [0.8939359784126282, "    result = 0\n    power = len(coefficients) - 1\n    for coeff in coefficients:\n        result += coeff * x ** power\n        power -= 1\n    return result"], [0.8920365571975708, "    roots = np.roots(coefficients)\n    real_roots = [root.real if abs(root.imag) < 1e-05 else root for root in roots]\n    return real_roots"], [0.8918818235397339, "    result = 0\n    for i in range(len(poly)):\n        result += poly[i] * (len(poly) - i - 1) * pow(x, len(poly) - i - 2)\n    return result"], [0.8918153047561646, "    try:\n        roots = np.roots(coefficients)\n    except ZeroDivisionError as e:\n        return f'Error: Division by zero. Full error - {e}'"], [0.8914489150047302, "    for i in range(len(poly)):\n        result += poly[i] * (len(poly) - i - 1) * pow(x, len(poly) - i - 2)"]]}
{"task_id": "HumanEval/33", "problem": [[0.9208225607872009, "    multiples_of_three = sorted([l[i] for i in range(len(l)) if (i + 1) % 3 == 0], reverse=True)\n    for i, value in enumerate(l):\n        if (i + 1) % 3 == 0:\n            l[i] = multiples_of_three.pop(0)\n    return l"], [0.9198426008224487, "    aux = [l[i] for i in range(0, len(l), 3)]\n    aux.sort()\n    for i in range(0, len(l), 3):\n        l[i] = aux.pop(0)\n    return l"], [0.9173316359519958, "    mod_map = {k: [] for k in range(0, 3)}\n    for item in lst:\n        mod = item % 3\n        mod_map[mod].append(item)\n    sorted_list = []\n    for key in mod_map.keys():\n        sorted_list.extend(sorted(mod_map[key]))\n    return sorted_list"], [0.910081684589386, "    multiples_of_3 = [num for num in lst if num % 3 == 0]\n    others = [num for num in lst if num % 3 != 0]\n    if order == 'asc':\n        others = sorted(others)\n    else:\n        others = sorted(others, reverse=True)\n    result = others + multiples_of_3\n    return result"], [0.9100762009620667, "    multiples_of_3 = [num for num in lst if num % 3 == 0]\n    others = [num for num in lst if num % 3 != 0]\n    if order == 'asc':\n        others = sorted(others)\n    else:\n        others = sorted(others, reverse=True)\n    result = others + multiples_of_3\n    return result"], [0.9041569828987122, "    arr = array[:]\n    even_group = []\n    odd_group = []\n    mixed_group = []\n    for i, num in enumerate(arr):\n        if i % 2 == 0 and num % 2 == 0:\n            even_group.append((i, num))\n        elif i % 2 == 1 and num % 2 == 1:\n            odd_group.append((i, num))\n        else:\n            mixed_group.append((i, num))\n    groups = [even_group, odd_group, mixed_group]\n    for group in groups:\n        sum_indices = sum((i for i, _ in group))\n        if sum_indices % 3 == 0:\n            group.sort(key=lambda x: x[1])\n        elif sum_indices % 2 == 0:\n            group.sort(key=lambda x: -x[1])\n        else:\n            evens = [num for _, num in group if num % 2 == 0]\n            evens.sort()\n            for i, (index, num) in enumerate(group):\n                if num % 2 == 0:\n                    group[i] = (index, evens.pop(0))\n    sorted_nums = [num for _, num in even_group + odd_group + mixed_group]\n    return sorted_nums"], [0.9005470871925354, "    divisible_by_3 = []\n    not_divisible_by_3 = []\n    for num in arr:\n        if num % 3 == 0:\n            divisible_by_3.append(num)\n        else:\n            not_divisible_by_3.append(num)\n    return divisible_by_3 + not_divisible_by_3"], [0.8995972275733948, "    for num in arr:\n        if num % 3 == 0:\n            divisible_by_3.append(num)\n        else:\n            not_divisible_by_3.append(num)"], [0.8992984890937805, "    even_items = [l[i] for i in range(0, len(l), 2)]\n    even_items.sort()\n    for i, e in enumerate(sorted(even_items)):\n        l[2 * i] = e\n    return l"], [0.8984860181808472, "    even_indices_values = [l[i] for i in range(0, len(l), 2)]\n    even_indices_values.sort()\n    for i in range(0, len(l), 2):\n        l[i] = even_indices_values[i // 2]\n    return l"]]}
{"task_id": "HumanEval/34", "problem": [[0.9393376111984253, "    unique_set = set(l)\n    unique_list = sorted(list(unique_set))\n    return unique_list"], [0.9347521066665649, "    unique_elements = list(set(l))\n    return sorted(unique_elements)"], [0.9217838644981384, "    l = list(set(l))\n    l.sort()\n    return l"], [0.919615626335144, "    unique_dict = {}\n    for num in lst:\n        unique_dict[num] = True\n    unique_list = list(unique_dict.keys())\n    unique_list.sort()\n    return unique_list"], [0.9193819761276245, "    unique_set = set(lst)\n    unique_list = list(unique_set)\n    unique_list.sort()\n    return unique_list"], [0.9158962368965149, "    unique_lst = list(set(lst))\n    unique_lst.sort()\n    return unique_lst"], [0.9141676425933838, "    if type(l) != list:\n        raise TypeError('Input should be a list')\n    for i in l:\n        if type(i) != int:\n            raise ValueError('Input list should only contain integers')\n    return sorted(list(set(l)))"], [0.9137210249900818, "    return sorted(list(set(l)))"], [0.9137204885482788, "    return sorted(list(set(l)))"], [0.9137172102928162, "    return sorted(list(set(l)))"]]}
{"task_id": "HumanEval/35", "problem": [[0.9228004813194275, "    max_elmt = l[0]\n    for x in l:\n        if x > max_elmt:\n            max_elmt = x\n    return max_elmt"], [0.9202615022659302, "    max_value = l[0]\n    for n in l:\n        if n > max_value:\n            max_value = n\n    return max_value"], [0.9197783470153809, "    max_element = lst[0]\n    for element in lst:\n        if element > max_element:\n            max_element = element\n    return max_element"], [0.9197593927383423, "    max_element = lst[0]\n    for element in lst:\n        if element > max_element:\n            max_element = element\n    return max_element"], [0.9195232391357422, "    max_element = lst[0]\n    for i in range(1, len(lst)):\n        if lst[i] > max_element:\n            max_element = lst[i]\n    return max_element"], [0.9145311117172241, "    largest = l[0]\n    for i in range(1, len(l)):\n        if l[i] > largest:\n            largest = l[i]\n    return largest"], [0.9136481285095215, "    max_element = None\n    for element in lst:\n        if max_element is None or max_element < element:\n            max_element = element\n    return max_element"], [0.9130918979644775, "    max_value = 0\n    for element in list:\n        if element > max_value:\n            max_value = element\n    return max_value"], [0.911694347858429, "    max_element = my_list[0]\n    for i in range(1, len(my_list)):\n        if my_list[i] > max_element:\n            max_element = my_list[i]\n    return max_element"], [0.9108866453170776, "    for element in lst:\n        if max_element is None or max_element < element:\n            max_element = element"]]}
{"task_id": "HumanEval/36", "problem": [[0.9296451807022095, "    count = 0\n    for i in range(n):\n        if i % 11 == 0 or i % 13 == 0:\n            count += str(i).count('7')\n    return count"], [0.9180513620376587, "    for i in range(n):\n        if i % 11 == 0 or i % 13 == 0:\n            count += str(i).count('7')"], [0.9064677953720093, "    count = 0\n    for i in range(1, abs(m)):\n        if '3' in str(i) and (i % 7 == 0 or i % 14 == 0):\n            count += 1\n    return count"], [0.9037972688674927, "        if i % 11 == 0 or i % 13 == 0:\n            count += str(i).count('7')"], [0.9024956226348877, "    count = 0\n    for num in range(start_num, end_num + 1):\n        if num % 7 == 0 and str(digit) in str(num):\n            count += 1\n    return count"], [0.899082362651825, "    for num in range(start_num, end_num + 1):\n        if num % 7 == 0 and str(digit) in str(num):\n            count += 1"], [0.896255373954773, "    count = 0\n    for i in range(n):\n        if '5' in str(i) or '7' in str(i):\n            if i % 9 == 0 or i % 12 == 0 or i % 15 == 0:\n                digits_sum = sum((int(digit) for digit in str(i)))\n                if digits_sum % 3 == 0 or digits_sum % 5 == 0:\n                    count += 1\n    return count"], [0.8953722715377808, "    for i in range(1, abs(m)):\n        if '3' in str(i) and (i % 7 == 0 or i % 14 == 0):\n            count += 1"], [0.8945675492286682, "    if n < 7:\n        return 0\n    elif n % 7 == 0 or n % 11 == 0:\n        return n + sum_multiples(n - 1)\n    else:\n        return sum_multiples(n - 1)"], [0.8945675492286682, "    if n < 7:\n        return 0\n    elif n % 7 == 0 or n % 11 == 0:\n        return n + sum_multiples(n - 1)\n    else:\n        return sum_multiples(n - 1)"]]}
{"task_id": "HumanEval/37", "problem": [[0.9385440349578857, "    even_indices_sorted = sorted((l[i] for i in range(0, len(l), 2)))\n    result = l[:]\n    result[::2] = even_indices_sorted\n    return result"], [0.9383949041366577, "    even_items = [l[i] for i in range(0, len(l), 2)]\n    even_items.sort()\n    for i, e in enumerate(sorted(even_items)):\n        l[2 * i] = e\n    return l"], [0.936000645160675, "    even_indices_values = [l[i] for i in range(0, len(l), 2)]\n    even_indices_values.sort()\n    for i in range(0, len(l), 2):\n        l[i] = even_indices_values[i // 2]\n    return l"], [0.9229893088340759, "    evens = sorted(l[::2])\n    for i in range(0, len(l), 2):\n        l[i] = evens.pop(0)\n    return l"], [0.9221898913383484, "    evens = [l[i] for i in range(0, len(l), 2)]\n    odds = [l[i] for i in range(1, len(l), 2)]\n    evens.sort(key=lambda x: -x if x < 0 else x)\n    new_list = [None] * len(l)\n    new_list[::2] = evens\n    new_list[1::2] = odds\n    return new_list"], [0.9208522439002991, "    odd_list = sorted((element for index, element in enumerate(l) if index % 2))\n    l_prime = [odd_list.pop(0) if index % 2 else element for index, element in enumerate(l)]\n    return l_prime"], [0.9194427728652954, "    even_index_elements = [l[i] for i in range(0, len(l), 2)]\n    if even_index_elements:\n        new_sorted_chunk = []\n        for i in range(0, len(even_index_elements), k):\n            new_sorted_chunk += sorted(even_index_elements[i:i + k])\n        for i, val in enumerate(new_sorted_chunk):\n            l[i * 2] = val\n    return l"], [0.9191133379936218, "    if even_index_elements:\n        new_sorted_chunk = []\n        for i in range(0, len(even_index_elements), k):\n            new_sorted_chunk += sorted(even_index_elements[i:i + k])\n        for i, val in enumerate(new_sorted_chunk):\n            l[i * 2] = val"], [0.9179609417915344, "    for i, e in enumerate(sorted(even_items)):\n        l[2 * i] = e"], [0.9177829623222351, "    for i in range(0, len(l), 2):\n        l[i] = even_indices_values[i // 2]"]]}
{"task_id": "HumanEval/38", "problem": [[0.9308345913887024, "    encoded_string = ''\n    for i in range(0, len(s), 3):\n        group = s[i:i + 3]\n        encoded_string += group[::-1]\n    return encoded_string"], [0.9281808137893677, "    groups = [s[i:min(i + 3, len(s))] for i in range(0, len(s), 3)]\n    decoded_groups = [group[-1] + group[:-1] if len(group) == 3 else group for group in groups]\n    return ''.join(decoded_groups)"], [0.9239972829818726, "    for i in range(0, len(s), 3):\n        group = s[i:i + 3]\n        encoded_string += group[::-1]"]]}
{"task_id": "HumanEval/39", "problem": [[0.9383587837219238, "    if n < 1:\n        raise ValueError('n must be a positive integer.')\n    prime_fibonacci_numbers = []\n    i = 2\n    while len(prime_fibonacci_numbers) < n:\n        sequence = generate_fibonacci_sequence(i)\n        number = sequence[-1]\n        if sympy.isprime(number):\n            prime_fibonacci_numbers.append(number)\n        i += 1\n    return prime_fibonacci_numbers[-1]"], [0.9315730929374695, "    fib_nums = fibonacci_seq(n)\n    prime_in_fib = [num for num in fib_nums if is_prime(num)]\n    return prime_in_fib"], [0.9306377172470093, "    while len(prime_fibonacci_numbers) < n:\n        sequence = generate_fibonacci_sequence(i)\n        number = sequence[-1]\n        if sympy.isprime(number):\n            prime_fibonacci_numbers.append(number)\n        i += 1"], [0.9292850494384766, "    fib_nums = [fib(i) for i in range(n + 1)]\n    return [num for num in fib_nums if is_prime(num)]"], [0.9258809685707092, "    fib_seq = fibonacci(n)\n    primes = [num for num in fib_seq if is_prime(num)]\n    return primes"], [0.9249085783958435, "    if n < 1:\n        return -1\n    count = 0\n    fib1, fib2 = (1, 1)\n    while True:\n        fib1, fib2 = (fib2, fib1 + fib2)\n        if is_prime(fib2):\n            count += 1\n            if count == n:\n                return fib2"], [0.9246553182601929, "    prime_numbers = SieveOfEratosthenes(n)\n    fib_numbers = fibonacci(n)\n    prime_fibs = [x for x in fib_numbers if x in prime_numbers]\n    return prime_fibs"], [0.9245330691337585, "    fib_n = generate_fibonacci(n)\n    primes = [i for i in range(fib_n + 1) if is_prime(i)]\n    return primes"], [0.9233629107475281, "    count = 0\n    num1, num2 = (0, 1)\n    while count < n:\n        fib_num = num1 + num2\n        if is_prime(fib_num):\n            count += 1\n        num1, num2 = (num2, fib_num)\n    return num2"]]}
{"task_id": "HumanEval/40", "problem": [[0.9074764251708984, "    if not all((num > 0 for num in lst)):\n        return False\n    if target_sum <= 0:\n        return False\n    if len(lst) != len(set(lst)):\n        return False\n    lst.sort()\n    n = len(lst)\n    for i in range(n - 2):\n        left, right = (i + 1, n - 1)\n        while left < right:\n            if lst[i] + lst[left] + lst[right] == target_sum:\n                return True\n            elif lst[i] + lst[left] + lst[right] < target_sum:\n                left += 1\n            else:\n                right -= 1\n    return False"], [0.9036989808082581, "    found = False\n    for i in range(0, len(arr) - 2):\n        for j in range(i + 1, len(arr) - 1):\n            for k in range(j + 1, len(arr)):\n                if arr[i] + arr[j] + arr[k] == 0:\n                    print('Found triplets ' + str(arr[i]) + ', ' + str(arr[j]) + ', ' + str(arr[k]))\n                    found = True\n    if found == False:\n        print('No Triplets found')"], [0.9014959931373596, "    for i in range(len(nums)):\n        for j in range(i + 1, len(nums)):\n            for k in range(j + 1, len(nums)):\n                if nums[i] + nums[j] + nums[k] == 0:\n                    return True\n    return False"], [0.8997225761413574, "    for i in range(len(arr)):\n        for j in range(i + 1, len(arr)):\n            for k in range(j + 1, len(arr)):\n                if arr[i] + arr[j] + arr[k] == 0:\n                    triplets.append((arr[i], arr[j], arr[k]))"], [0.8997094631195068, "    for i in range(len(arr)):\n        for j in range(i + 1, len(arr)):\n            for k in range(j + 1, len(arr)):\n                if arr[i] + arr[j] + arr[k] == 0:\n                    triplets.append([arr[i], arr[j], arr[k]])"], [0.8996568918228149, "    for i in range(0, len(arr) - 2):\n        for j in range(i + 1, len(arr) - 1):\n            for k in range(j + 1, len(arr)):\n                if arr[i] + arr[j] + arr[k] == 0:\n                    print('Found triplets ' + str(arr[i]) + ', ' + str(arr[j]) + ', ' + str(arr[k]))\n                    found = True"], [0.8989090323448181, "    for i in range(len(nums)):\n        for j in range(i + 1, len(nums)):\n            for k in range(j + 1, len(nums)):\n                if nums[i] + nums[j] + nums[k] == 0:\n                    return True"], [0.8988787531852722, "    triplets = []\n    for i in range(len(numbers)):\n        for j in range(i + 1, len(numbers)):\n            for k in range(j + 1, len(numbers)):\n                if numbers[i] + numbers[j] + numbers[k] == 0:\n                    triplets.append([numbers[i], numbers[j], numbers[k]])\n    return triplets"], [0.8986356258392334, "    for i in range(len(numbers)):\n        for j in range(i + 1, len(numbers)):\n            for k in range(j + 1, len(numbers)):\n                if numbers[i] + numbers[j] + numbers[k] == 0:\n                    triplets.append([numbers[i], numbers[j], numbers[k]])"], [0.8976364135742188, "    triplets = []\n    for i in range(len(arr)):\n        for j in range(i + 1, len(arr)):\n            for k in range(j + 1, len(arr)):\n                if arr[i] + arr[j] + arr[k] == 0:\n                    triplets.append([arr[i], arr[j], arr[k]])\n    return triplets"]]}
{"task_id": "HumanEval/41", "problem": [[0.8887654542922974, "    left_cars = sorted(left_cars, key=lambda x: x[0])\n    right_cars = sorted(right_cars, key=lambda x: x[0])\n    total_collisions = []\n    for t in range(n + 1):\n        for i in range(len(left_cars)):\n            for j in range(i, len(right_cars)):\n                if check_collision(left_cars[i], right_cars[j], t):\n                    total_collisions.append((i, j, t))\n    return total_collisions"], [0.8850287199020386, "    left_cars = [Car(i, *times) for i, times in enumerate(left_lane_autos)]\n    right_cars = [Car(i, *times) for i, times in enumerate(right_lane_autos)]\n    collisions = []\n    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p):\n                    collisions.append((i, j, k))\n                if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p):\n                    collisions.append((i, j, k))\n    if n > 3:\n        for i in range(n):\n            for j in range(i + 1, n):\n                for k in range(j + 1, n):\n                    for l in range(k + 1, n):\n                        if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p) and are_colliding(left_cars[i], left_cars[l], p):\n                            collisions.append((i, j, k, l))\n                        if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p) and are_colliding(right_cars[i], right_cars[l], p):\n                            collisions.append((i, j, k, l))\n    return collisions"], [0.885015606880188, "    left_cars = [Car(i, *times) for i, times in enumerate(left_lane_autos)]\n    right_cars = [Car(i, *times) for i, times in enumerate(right_lane_autos)]\n    collisions = []\n    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p):\n                    collisions.append((i, j, k))\n                if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p):\n                    collisions.append((i, j, k))\n    if n > 3:\n        for i in range(n):\n            for j in range(i + 1, n):\n                for k in range(j + 1, n):\n                    for l in range(k + 1, n):\n                        if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p) and are_colliding(left_cars[i], left_cars[l], p):\n                            collisions.append((i, j, k, l))\n                        if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p) and are_colliding(right_cars[i], right_cars[l], p):\n                            collisions.append((i, j, k, l))\n    return collisions"], [0.8848022222518921, "        for i in range(n):\n            for j in range(i + 1, n):\n                for k in range(j + 1, n):\n                    for l in range(k + 1, n):\n                        if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p) and are_colliding(left_cars[i], left_cars[l], p):\n                            collisions.append((i, j, k, l))\n                        if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p) and are_colliding(right_cars[i], right_cars[l], p):\n                            collisions.append((i, j, k, l))"], [0.8847989439964294, "        for i in range(n):\n            for j in range(i + 1, n):\n                for k in range(j + 1, n):\n                    for l in range(k + 1, n):\n                        if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p) and are_colliding(left_cars[i], left_cars[l], p):\n                            collisions.append((i, j, k, l))\n                        if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p) and are_colliding(right_cars[i], right_cars[l], p):\n                            collisions.append((i, j, k, l))"], [0.8837414979934692, "    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p):\n                    collisions.append((i, j, k))\n                if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p):\n                    collisions.append((i, j, k))"], [0.8837326765060425, "    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                if are_colliding(left_cars[i], left_cars[j], p) and are_colliding(left_cars[i], left_cars[k], p):\n                    collisions.append((i, j, k))\n                if are_colliding(right_cars[i], right_cars[j], p) and are_colliding(right_cars[i], right_cars[k], p):\n                    collisions.append((i, j, k))"], [0.8833754062652588, "    i = 0\n    if n % 2 == 0:\n        i += 2\n    else:\n        i -= 1\n    return i * (n // 2)"], [0.8827618360519409, "    matches = 0\n    while n > 1:\n        matches += n // 2\n        n = (n + 1) // 2\n    return matches"], [0.8827585577964783, "    matches = 0\n    while n > 1:\n        matches += n // 2\n        n = (n + 1) // 2\n    return matches"]]}
{"task_id": "HumanEval/42", "problem": [[0.8941209316253662, "    new_list = []\n    for i in list_int:\n        new_list.append(i + 1)\n    return new_list"], [0.8930460214614868, "    for i in range(len(lst)):\n        lst[i] += 1\n    return lst"], [0.889524519443512, "    lst_new = []\n    for i in lst:\n        lst_new.append(i + 1)\n    return lst_new"], [0.8885980248451233, "    for i in range(len(lst)):\n        lst[i] += 1"], [0.8879813551902771, "    return [elem + 1 for elem in lst]"], [0.8878774046897888, "    for i in range(len(num_list)):\n        num_list[i] += 1\n    return num_list"], [0.8864058256149292, "    for i in list_int:\n        new_list.append(i + 1)"], [0.8854478597640991, "    transformed_list = []\n    for value in input_list:\n        transformed_value = value + 1\n        transformed_list.append(transformed_value)\n    return transformed_list"], [0.8845611214637756, "    for i in lst:\n        lst_new.append(i + 1)"], [0.8820666670799255, "    for i in range(len(lst) - 1):\n        lst[i] += 1\n        lst[i + 1] += 1\n    return lst"]]}
{"task_id": "HumanEval/43", "problem": [[0.8999028205871582, "    pairs = []\n    nums = sorted(l)\n    check_set = set()\n    for i, num in enumerate(nums):\n        if -num in check_set:\n            pairs.append((-num, num))\n        else:\n            check_set.add(num)\n    return pairs"], [0.8984917402267456, "    pairs = set()\n    count = 0\n    for num in nums:\n        if -num in pairs:\n            pairs.remove(-num)\n            count += 1\n        else:\n            pairs.add(num)\n    return count == 2"], [0.8979940414428711, "    if len(l) % 2 == 0:\n        s = sum(l)\n        if lower_bound <= s <= upper_bound:\n            return True\n        else:\n            return False\n    else:\n        return False"], [0.8979940414428711, "    if len(l) % 2 == 0:\n        s = sum(l)\n        if lower_bound <= s <= upper_bound:\n            return True\n        else:\n            return False\n    else:\n        return False"], [0.8979668617248535, "    for i in range(len(arr)):\n        for j in range(i + 1, len(arr)):\n            if arr[i] + arr[j] == 0:\n                return True\n    return False"], [0.8970838785171509, "    if len(l) % 2 != 0:\n        return False\n    total_sum = sum(l)\n    if lower_bound <= total_sum <= upper_bound:\n        return True\n    else:\n        return False"], [0.8967243432998657, "    for i in range(len(arr)):\n        for j in range(i + 1, len(arr)):\n            if arr[i] + arr[j] == 0:\n                return True"]]}
{"task_id": "HumanEval/44", "problem": [[0.9275479912757874, "    if not isinstance(x, str):\n        raise ValueError('Input x must be a string.')\n    if not isinstance(base, int):\n        raise ValueError('Input base must be an integer.')\n    if base not in (8, 10, 16):\n        raise ValueError('Base must be 8 (octal), 10 (decimal), or 16 (hexadecimal).')\n    binary = bin(int(x, base))[2:]\n    return binary"], [0.9207617044448853, "    if base == 8:\n        decimal = int(x, 8)\n    elif base == 10:\n        decimal = int(x)\n    elif base == 16:\n        decimal = int(x, 16)\n    else:\n        raise ValueError('Invalid base, base must be in [8, 10, 16]')\n    binary = bin(decimal).replace('0b', '')\n    return binary"], [0.9193068146705627, "    if n < base:\n        return convert_string[n]\n    else:\n        return to_base_x(n // base, base) + convert_string[n % base]"], [0.9187434911727905, "    convert_string = string.digits + string.ascii_lowercase\n    if num < base:\n        return convert_string[num]\n    else:\n        return int_to_string(num // base, base) + convert_string[num % base]"], [0.9184775948524475, "    if base == 10:\n        return str(num)\n    elif base == 2:\n        return bin(num)\n    elif base == 8:\n        return oct(num)\n    elif base == 16:\n        return hex(num)\n    else:\n        alphabet = string.digits + string.ascii_lowercase\n        base_n = []\n        while num:\n            num, rem = divmod(num, base)\n            base_n.append(alphabet[rem])\n        return ''.join(reversed(base_n))"], [0.9184775948524475, "    if base == 10:\n        return str(num)\n    elif base == 2:\n        return bin(num)\n    elif base == 8:\n        return oct(num)\n    elif base == 16:\n        return hex(num)\n    else:\n        alphabet = string.digits + string.ascii_lowercase\n        base_n = []\n        while num:\n            num, rem = divmod(num, base)\n            base_n.append(alphabet[rem])\n        return ''.join(reversed(base_n))"], [0.9163768291473389, "    x = int(x, base)\n    binary = bin(x)\n    return binary[2:]"], [0.9163603782653809, "    x = int(x, base)\n    binary = bin(x)\n    return binary[2:]"], [0.9157972931861877, "    convert_string = '0123456789ABCDEF'\n    if n < base:\n        return convert_string[n]\n    else:\n        return to_base_x(n // base, base) + convert_string[n % base]"], [0.9151265025138855, "    if base < 2 or base > 10:\n        return -1\n    digits = []\n    while num > 0:\n        digits.append(str(num % base))\n        num //= base\n    if base == 2:\n        prefix = '0b'\n    elif base == 8:\n        prefix = '0o'\n    else:\n        prefix = ''\n    return '{}{}'.format(prefix, ''.join(digits[::-1]))"]]}
{"task_id": "HumanEval/45", "problem": [[0.9036229252815247, "    assert tri_area(6, 4) == 12"], [0.9036173224449158, "    assert tri_area(6, 4) == 12"]]}
{"task_id": "HumanEval/46", "problem": [[0.9089230298995972, "    fibfib_array = [0, 0, 1, 1] + [0] * (n - 3)\n    for i in range(4, n + 1):\n        if i <= 1000:\n            fibfib_array[i] = fibfib_array[i - 1] + fibfib_array[i - 2] + fibfib_array[i - 3] + fibfib_array[i - 4]\n        else:\n            fibfib_array[i] = sum(fibfib_array[i - 1000:i])\n    return fibfib_array[n]"], [0.9070357084274292, "    if not isinstance(n, int) or n < 0:\n        raise ValueError('The parameter n must be a non-negative integer')\n    if not isinstance(offset, int) or offset < 0:\n        raise ValueError('The offset must be a non-negative integer')\n    fib_seq = [None] * (n + offset + 1)\n    for i in range(offset):\n        fib_seq[i] = 0\n    fib_seq[offset:offset + 6] = [0, 1, 1, 2, 4, 7] + [None] * max(0, n - 6)\n    for i in range(offset + 6, n + offset + 1):\n        fib_seq[i] = fib_seq[i - 1] + fib_seq[i - 3] + fib_seq[i - 4] + fib_seq[i - 6]\n    return fib_seq[n + offset]"], [0.9070250391960144, "    if not isinstance(n, int) or n < 0:\n        raise ValueError('The parameter n must be a non-negative integer')\n    if not isinstance(offset, int) or offset < 0:\n        raise ValueError('The offset must be a non-negative integer')\n    fib_seq = [None] * (n + offset + 1)\n    for i in range(offset):\n        fib_seq[i] = 0\n    fib_seq[offset:offset + 6] = [0, 1, 1, 2, 4, 7] + [None] * max(0, n - 6)\n    for i in range(offset + 6, n + offset + 1):\n        fib_seq[i] = fib_seq[i - 1] + fib_seq[i - 3] + fib_seq[i - 4] + fib_seq[i - 6]\n    return fib_seq[n + offset]"], [0.9038613438606262, "    elif n == 0:\n        result = offset\n    elif n == 1:\n        result = 1 + offset\n    elif n == 2:\n        result = 1 + 2 * offset\n    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.903833270072937, "    elif n == 0:\n        result = offset\n    elif n == 1:\n        result = 1 + offset\n    elif n == 2:\n        result = 1 + 2 * offset\n    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.9033626317977905, "    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.9033549427986145, "    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.9028928279876709, "    elif n == 2:\n        result = 1 + 2 * offset\n    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.9028732776641846, "    elif n == 2:\n        result = 1 + 2 * offset\n    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"], [0.9023526310920715, "    elif n == 1:\n        result = 1 + offset\n    elif n == 2:\n        result = 1 + 2 * offset\n    elif n == 3:\n        result = 2 + 4 * offset\n    else:\n        result = fib_modified_with_offset(n - 1, offset, memo) + fib_modified_with_offset(n - 3, offset, memo) + fib_modified_with_offset(n - 4, offset, memo)"]]}
{"task_id": "HumanEval/47", "problem": [[0.9396935701370239, "    if len(l) % 2 == 0:\n        median = (l[len(l) // 2 - 1] + l[len(l) // 2]) / 2\n    else:\n        median = l[len(l) // 2]"], [0.9379260540008545, "    sorted_l = sorted(l)\n    len_l = len(l)\n    if len_l % 2 == 0:\n        median = (sorted_l[len_l // 2 - 1] + sorted_l[len_l // 2]) / 2\n    else:\n        median = sorted_l[(len_l - 1) // 2]\n    return median"]]}
{"task_id": "HumanEval/48", "problem": []}
{"task_id": "HumanEval/49", "problem": [[0.9084287285804749, "    mod = 10 ** 9 + 7\n    x = (1 << p) - 1\n    y = (1 << p) - 2\n    z = pow(y, x - 1, mod)\n    return x * z % mod"], [0.9083428382873535, "    mod = 10 ** 9 + 7\n    x = (1 << p) - 1\n    y = (1 << p) - 2\n    z = pow(y, x - 1, mod)\n    return x * z % mod"], [0.903135359287262, "    return power(n, p - 2, p)"], [0.8999300003051758, "    MOD = 10 ** 9 + 7\n    prod = 1\n    a = (1 << p) - 2\n    b = ((1 << p) - 1) % MOD\n    while a > 0:\n        if a % 2:\n            prod = prod * b % MOD\n        b = b * b % MOD\n        a //= 2\n    return prod"], [0.899915337562561, "    MOD = 10 ** 9 + 7\n    prod = 1\n    a = (1 << p) - 2\n    b = ((1 << p) - 1) % MOD\n    while a > 0:\n        if a % 2:\n            prod = prod * b % MOD\n        b = b * b % MOD\n        a //= 2\n    return prod"], [0.8935517072677612, "    if n == 0:\n        return 2 % m\n    elif n == 1:\n        return 1 % m"], [0.8934813141822815, "    if n == 0:\n        return 2 % m\n    elif n == 1:\n        return 1 % m"], [0.8925497531890869, "    if power < 0 or (modulo is not None and modulo <= 0):\n        raise ValueError('Power and modulo, if provided, should be positive.')\n    fact = 1\n    for i in range(1, n + 1):\n        fact = (fact * i) ** power\n        if modulo:\n            fact %= modulo\n    return fact"], [0.8924601674079895, "    if p == 0:\n        return 1\n    result = 1\n    abs_p = abs(p)\n    while abs_p > 0:\n        if abs_p % 2 == 1:\n            result *= base\n        base *= base\n        abs_p //= 2\n    return result if p > 0 else 1 / result"], [0.8924557566642761, "    result = 1\n    base = base % modulus\n    while exponent > 0:\n        if exponent % 2 == 1:\n            result = result * base % modulus\n        exponent = exponent >> 1\n        base = base * base % modulus\n    return result"]]}
{"task_id": "HumanEval/50", "problem": [[0.9387513995170593, "    decoded = ''\n    for c in s:\n        decoded += chr(ord(c) - 5)\n    return decoded"], [0.9379106760025024, "    encoded = ''\n    for c in s:\n        encoded += chr(ord(c) + 5)\n    return encoded"], [0.9361056089401245, "    shift_upper = 5\n    shift_lower = 8\n    return ''.join([chr((ord(char) - ord('A') + shift_upper) % 26 + ord('A')) if char.isupper() else chr((ord(char) - ord('a') + shift_lower) % 26 + ord('a')) if char.islower() else char for char in s])"], [0.9341468214988708, "    decoded_string = ''\n    for char in encoded_string:\n        if char.isalpha():\n            shift_amount = 65 if char.isupper() else 97\n            decoded_char = chr((ord(char) - shift_amount - shift) % 26 + shift_amount)\n            decoded_string += decoded_char\n        else:\n            decoded_string += char\n    return decoded_string"], [0.9314632415771484, "    upper = (65, 91)\n    lower = (97, 123)\n    result = ''\n    text = text[::-1]\n    shift = -5\n    for char in text:\n        ascii_val = ord(char)\n        if upper[0] <= ascii_val <= upper[1]:\n            result += chr((ascii_val - upper[0] + shift) % 26 + upper[0])\n        elif lower[0] <= ascii_val <= lower[1]:\n            result += chr((ascii_val - lower[0] + shift) % 26 + lower[0])\n        else:\n            result += char\n    return result"], [0.9312594532966614, "    encoded_string = ''\n    for character in input_string:\n        if character.isalpha():\n            char_code = ord(character.lower()) if character.islower() else ord(character.upper())\n            char_code += shift\n            if character.islower() and char_code > ord('z'):\n                char_code -= 26\n            elif char_code > ord('Z'):\n                char_code -= 26\n            shifted_character = chr(char_code) if character.islower() else chr(char_code).upper()\n            encoded_string += shifted_character\n        else:\n            encoded_string += character\n    return encoded_string"], [0.9300140738487244, "    encrypted_msg = ''\n    for c in msg:\n        encrypted_msg += chr(ord(c) + 5)\n    return encrypted_msg"], [0.9296896457672119, "    encoded_string = ''\n    for char in string:\n        if char.isalpha():\n            if char.isupper():\n                base = ord('A')\n            else:\n                base = ord('a')\n            encoded_char = chr(base + (ord(char) - base + shift) % 26)\n            encoded_string += encoded_char\n        else:\n            encoded_string += char\n    return encoded_string"], [0.9290949106216431, "    decoded_message = ''\n    for char in s:\n        if char.isalpha():\n            shift_amount = 65 if char.isupper() else 97\n            decoded_char = chr((ord(char) - shift_amount - shift) % 26 + shift_amount)\n            decoded_message += decoded_char\n        else:\n            decoded_message += char\n    return decoded_message"], [0.928636908531189, "    encoded = ''\n    for i in range(len(s)):\n        shift = mask[i % len(mask)]\n        encoded += chr((ord(s[i]) - 97 + shift) % 26 + 97)\n    return encoded"]]}
{"task_id": "HumanEval/51", "problem": [[0.9380587339401245, "    no_vowels = ''\n    for character in text:\n        if character not in 'aeiouAEIOU':\n            no_vowels += character\n    return no_vowels"], [0.9379623532295227, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    no_vowels = ''\n    for letter in text:\n        if letter.lower() not in vowels:\n            no_vowels += letter\n    return no_vowels"]]}
{"task_id": "HumanEval/52", "problem": [[0.9341239333152771, "    if t <= 0:\n        raise ValueError('Threshold must be a positive integer')\n    if not l:\n        raise ValueError('Input list cannot be empty')\n    return all((i < t for i in l))"], [0.9065929651260376, "    for i in l:\n        if i >= t:\n            return False\n    return True"], [0.904969334602356, "    for item in l:\n        if isinstance(item, int) and item > t:\n            return False\n    return True"], [0.9043049812316895, "    for num in l:\n        if num > t:\n            return False\n    return True"], [0.9002653360366821, "    for i in l:\n        if isinstance(i, int) and i > t:\n            return False\n    return True"], [0.8996913433074951, "    for i in l:\n        if i >= t:\n            return False"], [0.8988613486289978, "    for item in l:\n        if isinstance(item, int) and item > t:\n            return False"], [0.8963354825973511, "    for num in l:\n        if num > t:\n            return False"], [0.8951560258865356, "    for element in l:\n        if type(element) is int:\n            if element > t:\n                return False\n    return True"], [0.8947467803955078, "    for i in l:\n        if isinstance(i, int) and i > t:\n            return False"]]}
{"task_id": "HumanEval/53", "problem": []}
{"task_id": "HumanEval/54", "problem": [[0.9180272221565247, "    for i in range(len(chars1)):\n        if chars1[i] != chars2[i]:\n            return False"], [0.9159973859786987, "    s1 = ''.join((ch.lower() for ch in s1 if ch.isalnum()))\n    s2 = ''.join((ch.lower() for ch in s2 if ch.isalnum()))\n    char_count = {}\n    for ch in s1:\n        char_count[ch] = char_count.get(ch, 0) + 1\n    for ch in s2:\n        char_count[ch] = char_count.get(ch, 0) - 1\n    return all((count == 0 for count in char_count.values()))"], [0.9143089056015015, "    ch_freq1 = count_char_freq(word1)\n    ch_freq2 = count_char_freq(word2)\n    if ch_freq1 == ch_freq2:\n        return True\n    return False"], [0.9132440686225891, "    if len(s1_chars) != len(s2_chars):\n        return False"], [0.9113649129867554, "    counter1, counter2 = (Counter(word1), Counter(word2))\n    return set(word1) == set(word2) and sorted(counter1.values()) == sorted(counter2.values())"], [0.9112029075622559, "    if len(s1) != len(s2):\n        return False\n    char_counts1 = count_chars(s1)\n    char_counts2 = count_chars(s2)\n    if len(char_counts1) != len(char_counts2):\n        return False\n    for char, count in char_counts1.items():\n        if char not in char_counts2 or count != char_counts2[char]:\n            return False\n    return True"], [0.9109646677970886, "    for char, count in char_counts1.items():\n        if char not in char_counts2 or count != char_counts2[char]:\n            return False"], [0.9100642204284668, "    is_same = False\n    if len(str1) == len(str2):\n        str1_set = set(str1)\n        str2_set = set(str2)\n        if str1_set == str2_set:\n            is_same = True\n    return is_same"], [0.9100067019462585, "    s1 = ''.join(filter(str.isalpha, s1.lower()))\n    s2 = ''.join(filter(str.isalpha, s2.lower()))\n    return sorted(s1) == sorted(s2)"], [0.9099527597427368, "    s1 = ''.join(sorted(s1))\n    s2 = ''.join(sorted(s2))\n    return s1 == s2"]]}
{"task_id": "HumanEval/55", "problem": []}
{"task_id": "HumanEval/56", "problem": [[0.9271270632743835, "    s = []\n    for bracket in brackets:\n        if bracket == '<':\n            s.append('<')\n        elif not s:\n            return False\n        else:\n            s.pop()\n    if not s:\n        return True\n    else:\n        return False"], [0.9173280596733093, "    for bracket in brackets:\n        if bracket == '<':\n            s.append('<')\n        elif not s:\n            return False\n        else:\n            s.pop()"], [0.9123591780662537, "        if bracket == '<':\n            s.append('<')\n        elif not s:\n            return False\n        else:\n            s.pop()"], [0.9119085669517517, "    stack = []\n    opening_brackets = {'(', '{', '[', '<'}\n    closing_brackets = {')', '}', ']', '>'}\n    bracket_pairs = {'(': ')', '{': '}', '[': ']', '<': '>'}\n    for char in expression:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if not stack:\n                return False\n            last_opening_bracket = stack.pop()\n            if bracket_pairs[last_opening_bracket] != char:\n                return False\n    return len(stack) == 0"], [0.9078448414802551, "    for i, char in enumerate(expression):\n        if char in '([{<':\n            stack.append(char)\n            if char == '<':\n                angle_brackets_stack.append('<')\n                angle_brackets_positions.append(i)\n        elif char in ')]}>':\n            if not stack:\n                return False\n            top = stack.pop()\n            if char == ')':\n                if top != '(':\n                    return False\n            elif char == ']':\n                if top != '[':\n                    return False\n            elif char == '}':\n                if top != '{':\n                    return False\n            elif char == '>':\n                if top != '<':\n                    return False\n                angle_brackets_stack.pop()\n                angle_brackets_positions.pop()"], [0.9073199033737183, "        if char in '([{<':\n            stack.append(char)\n            if char == '<':\n                angle_brackets_stack.append('<')\n                angle_brackets_positions.append(i)\n        elif char in ')]}>':\n            if not stack:\n                return False\n            top = stack.pop()\n            if char == ')':\n                if top != '(':\n                    return False\n            elif char == ']':\n                if top != '[':\n                    return False\n            elif char == '}':\n                if top != '{':\n                    return False\n            elif char == '>':\n                if top != '<':\n                    return False\n                angle_brackets_stack.pop()\n                angle_brackets_positions.pop()"], [0.9056227207183838, "    stack = []\n    angle_brackets_stack = []\n    angle_brackets_positions = []\n    for i, char in enumerate(expression):\n        if char in '([{<':\n            stack.append(char)\n            if char == '<':\n                angle_brackets_stack.append('<')\n                angle_brackets_positions.append(i)\n        elif char in ')]}>':\n            if not stack:\n                return False\n            top = stack.pop()\n            if char == ')':\n                if top != '(':\n                    return False\n            elif char == ']':\n                if top != '[':\n                    return False\n            elif char == '}':\n                if top != '{':\n                    return False\n            elif char == '>':\n                if top != '<':\n                    return False\n                angle_brackets_stack.pop()\n                angle_brackets_positions.pop()\n    if stack or angle_brackets_stack:\n        return False\n    if angle_brackets_positions:\n        return angle_brackets_positions[0]\n    return True"], [0.9046058058738708, "            elif char == '>':\n                if top != '<':\n                    return False\n                angle_brackets_stack.pop()\n                angle_brackets_positions.pop()"], [0.9036117792129517, "    stack = []\n    bracket_pairs = {'(': ')', '[': ']', '{': '}', '<': '>', \"'\": \"'\"}\n    for char in input_string:\n        if char in bracket_pairs:\n            stack.append(char)\n        elif char in bracket_pairs.values():\n            if not stack or bracket_pairs[stack.pop()] != char:\n                return False\n    return not stack"], [0.9032183885574341, "    stack = []\n    openers_to_closers = {'(': ')', '[': ']', '{': '}', '<': '>'}\n    closers = set(openers_to_closers.values())\n    for char in s:\n        if char in openers_to_closers:\n            stack.append(char)\n        elif char in closers:\n            if not stack:\n                return False\n            else:\n                last_unclosed_opener = stack.pop()\n                if not char == openers_to_closers[last_unclosed_opener]:\n                    return False\n    return stack == []"]]}
{"task_id": "HumanEval/57", "problem": [[0.9249036312103271, "    if is_nested:\n        return all((monotonic(sub_list, strict) for sub_list in l))\n    elif strict:\n        return all((i < j for i, j in zip(l, l[1:]))) or all((i > j for i, j in zip(l, l[1:])))\n    else:\n        return all((i <= j for i, j in zip(l, l[1:]))) or all((i >= j for i, j in zip(l, l[1:])))"], [0.9248995780944824, "    if is_nested:\n        return all((monotonic(sub_list, strict) for sub_list in l))\n    elif strict:\n        return all((i < j for i, j in zip(l, l[1:]))) or all((i > j for i, j in zip(l, l[1:])))\n    else:\n        return all((i <= j for i, j in zip(l, l[1:]))) or all((i >= j for i, j in zip(l, l[1:])))"], [0.9227299690246582, "    try:\n        is_nested = any((isinstance(i, list) for i in l))\n    except TypeError:\n        print('Input value is not iterable')\n        return False\n    if is_nested:\n        return all((monotonic(sub_list, strict) for sub_list in l))\n    elif strict:\n        return all((i < j for i, j in zip(l, l[1:]))) or all((i > j for i, j in zip(l, l[1:])))\n    else:\n        return all((i <= j for i, j in zip(l, l[1:]))) or all((i >= j for i, j in zip(l, l[1:])))"], [0.9226861000061035, "    try:\n        is_nested = any((isinstance(i, list) for i in l))\n    except TypeError:\n        print('Input value is not iterable')\n        return False\n    if is_nested:\n        return all((monotonic(sub_list, strict) for sub_list in l))\n    elif strict:\n        return all((i < j for i, j in zip(l, l[1:]))) or all((i > j for i, j in zip(l, l[1:])))\n    else:\n        return all((i <= j for i, j in zip(l, l[1:]))) or all((i >= j for i, j in zip(l, l[1:])))"], [0.9198437333106995, "    is_monotonic = True\n    for i in range(len(list) - 1):\n        if list[i] > list[i + 1]:\n            is_monotonic = False\n    return is_monotonic"], [0.9195631742477417, "    increasing = decreasing = True\n    for i in range(len(l) - 1):\n        if strict:\n            if l[i] > l[i + 1]:\n                increasing = False\n            elif l[i] < l[i + 1]:\n                decreasing = False\n        elif l[i] >= l[i + 1]:\n            increasing = False\n        elif l[i] <= l[i + 1]:\n            decreasing = False\n        if not increasing and (not decreasing):\n            return False\n    return True"], [0.9187198877334595, "    if len(l) < 2:\n        return True\n    if strict:\n        diff = [l[i + 1] - l[i] for i in range(len(l) - 1)]\n        if all((i > 0 for i in diff)):\n            return True\n        if all((i < 0 for i in diff)):\n            return True\n        return False\n    else:\n        diff = [l[i + 1] - l[i] for i in range(len(l) - 1)]\n        if all((i >= 0 for i in diff)):\n            return True\n        if all((i <= 0 for i in diff)):\n            return True\n        return False"], [0.9185817241668701, "    if strict:\n        diff = [l[i + 1] - l[i] for i in range(len(l) - 1)]\n        if all((i > 0 for i in diff)):\n            return True\n        if all((i < 0 for i in diff)):\n            return True\n        return False\n    else:\n        diff = [l[i + 1] - l[i] for i in range(len(l) - 1)]\n        if all((i >= 0 for i in diff)):\n            return True\n        if all((i <= 0 for i in diff)):\n            return True\n        return False"], [0.9184439778327942, "    increasing = decreasing = True\n    for i in range(len(l) - 1):\n        if strict:\n            if l[i] <= l[i + 1]:\n                increasing = False\n            elif l[i] >= l[i + 1]:\n                decreasing = False\n        elif l[i] < l[i + 1]:\n            increasing = False\n        elif l[i] > l[i + 1]:\n            decreasing = False\n    if not increasing and (not decreasing):\n        return False\n    return True"], [0.9173667430877686, "    for i in range(len(l) - 1):\n        if strict:\n            if l[i] > l[i + 1]:\n                increasing = False\n            elif l[i] < l[i + 1]:\n                decreasing = False\n        elif l[i] >= l[i + 1]:\n            increasing = False\n        elif l[i] <= l[i + 1]:\n            decreasing = False\n        if not increasing and (not decreasing):\n            return False"]]}
{"task_id": "HumanEval/58", "problem": [[0.9372702836990356, "    common = list(set(l1) & set(l2))\n    common.sort()\n    return common"], [0.9364875555038452, "    common = set(l1) & set(l2)\n    return sorted(list(common))"], [0.9341560006141663, "    common = []\n    sorted1 = quick_sort(list1)\n    sorted2 = quick_sort(list2)\n    i = j = 0\n    while i < len(sorted1) and j < len(sorted2):\n        if sorted1[i] == sorted2[j]:\n            if len(common) == 0 or common[-1] != sorted1[i]:\n                common.append(sorted1[i])\n            i += 1\n            j += 1\n        elif sorted1[i] < sorted2[j]:\n            i += 1\n        else:\n            j += 1\n    return common"], [0.9341472387313843, "    common = []\n    sorted1 = quick_sort(list1)\n    sorted2 = quick_sort(list2)\n    i = j = 0\n    while i < len(sorted1) and j < len(sorted2):\n        if sorted1[i] == sorted2[j]:\n            if len(common) == 0 or common[-1] != sorted1[i]:\n                common.append(sorted1[i])\n            i += 1\n            j += 1\n        elif sorted1[i] < sorted2[j]:\n            i += 1\n        else:\n            j += 1\n    return common"], [0.934141993522644, "    common = []\n    sorted1 = quick_sort(list1)\n    sorted2 = quick_sort(list2)\n    i = j = 0\n    while i < len(sorted1) and j < len(sorted2):\n        if sorted1[i] == sorted2[j]:\n            if len(common) == 0 or common[-1] != sorted1[i]:\n                common.append(sorted1[i])\n            i += 1\n            j += 1\n        elif sorted1[i] < sorted2[j]:\n            i += 1\n        else:\n            j += 1\n    return common"], [0.9339771270751953, "    dict_list1 = {i: True for i in l1}\n    common_elements = {i: True for i in l2 if i in dict_list1}\n    return sorted(common_elements.keys())"], [0.9321593046188354, "    common_elements = []\n    for element in list1:\n        if element in list2 and element not in common_elements:\n            common_elements.append(element)\n    return sorted(common_elements)"], [0.930749773979187, "    sorted1 = merge_sort(list1)\n    sorted2 = merge_sort(list2)\n    common = []\n    i, j = (0, 0)\n    while i < len(sorted1) and j < len(sorted2):\n        if sorted1[i] == sorted2[j]:\n            if not common or common[-1] != sorted1[i]:\n                common.append(sorted1[i])\n            i += 1\n            j += 1\n        elif sorted1[i] < sorted2[j]:\n            i += 1\n        else:\n            j += 1\n    return common"], [0.9304750561714172, "    sorted1 = merge_sort(list1)\n    sorted2 = merge_sort(list2)\n    common = []\n    i, j = (0, 0)\n    while i < len(sorted1) and j < len(sorted2):\n        if sorted1[i] == sorted2[j]:\n            if not (common and common[-1] == sorted1[i]):\n                common.append(sorted1[i])\n            i += 1\n            j += 1\n        elif sorted1[i] < sorted2[j]:\n            i += 1\n        else:\n            j += 1\n    return common"], [0.930425763130188, "    common_elements = [i for i in l1 if i in l2]\n    unique_common_elements = remove_duplicates(common_elements)\n    sorted_unique_common_elements = merge_sort(unique_common_elements)\n    return sorted_unique_common_elements"]]}
{"task_id": "HumanEval/59", "problem": [[0.9338700771331787, "    if n <= 1:\n        return 1\n    largest_prime_factor = 1\n    for i in range(2, n + 1):\n        if n % i == 0:\n            largest_prime_factor = i\n            break\n    return max(largest_prime_factor, largest_prime_factor(int(n / i)))"], [0.9336888790130615, "    while n % 2 == 0:\n        largest_factor = 2\n        n //= 2"], [0.9336816072463989, "    while n % 2 == 0:\n        largest_factor = 2\n        n //= 2"], [0.9328658580780029, "    if n < 2:\n        return 0\n    while n % 2 == 0:\n        n = n // 2\n    largest_factor = 1\n    for i in range(3, int(n ** 0.5) + 1, 2):\n        while n % i == 0:\n            largest_factor = i\n            n = n // i\n    if n > 2:\n        largest_factor = n\n    return largest_factor"], [0.9325284957885742, "    largest_factor = 1\n    while n % 2 == 0:\n        largest_factor = 2\n        n //= 2\n    i = 3\n    while n != 1:\n        while n % i == 0:\n            largest_factor = i\n            n //= i\n        i += 2\n    return largest_factor"], [0.9305192232131958, "    if n == 0:\n        raise ValueError('The prime factor of zero is undefined.')\n    n = abs(n)\n    i = 2\n    factors = []\n    while i * i <= n:\n        if n % i:\n            i += 1\n        else:\n            n //= i\n            factors.append(i)\n    if n > 1:\n        factors.append(n)\n    return max(factors)"], [0.9301663041114807, "    while n % 2 == 0:\n        largest_factor = 2\n        n = n / 2"], [0.9294538497924805, "    if not isinstance(n, int) or n < 1:\n        raise ValueError('Invalid input. Please provide a positive integer.')\n    if n == 1:\n        return 1\n    largest_factor = 1\n    while n % 2 == 0:\n        largest_factor = 2\n        n //= 2\n    p = 3\n    while p <= math.isqrt(n):\n        if n % p == 0:\n            largest_factor = p\n            n //= p\n        else:\n            p += 2\n    if n > 2:\n        largest_factor = n\n    return largest_factor"], [0.9294328689575195, "    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"], [0.9294247031211853, "    elif n % divisor == 0:\n        return find_largest_prime(n // divisor, divisor)\n    else:\n        return find_largest_prime(n, divisor + 1)"]]}
{"task_id": "HumanEval/60", "problem": [[0.9309861660003662, "    if n == 1:\n        return 1\n    else:\n        return n + sum_to_n(n - 1)"], [0.9309861660003662, "    if n == 1:\n        return 1\n    else:\n        return n + sum_to_n(n - 1)"]]}
{"task_id": "HumanEval/61", "problem": [[0.9223072528839111, "    stack = []\n    for bracket in brackets:\n        if bracket == '(':\n            stack.append(bracket)\n        elif bracket == ')':\n            if not stack or stack.pop() != '(':\n                return False\n    return not stack"], [0.9173069000244141, "    for char in s:\n        if char == '(':\n            open_brackets += 1\n        elif char == ')':\n            if open_brackets == 0:\n                return False\n            open_brackets -= 1"], [0.9161421656608582, "    for bracket in brackets:\n        if bracket == '(':\n            stack.append(bracket)\n        elif bracket == ')':\n            if not stack or stack.pop() != '(':\n                return False"], [0.9142302870750427, "    for char in string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if not stack:\n                return False\n            opening_bracket = stack.pop()\n            if opening_brackets.index(opening_bracket) != closing_brackets.index(char):\n                return False"], [0.9126038551330566, "        if char == '(':\n            open_brackets += 1\n        elif char == ')':\n            if open_brackets == 0:\n                return False\n            open_brackets -= 1"], [0.9117569923400879, "    for char in string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if len(stack) == 0 or bracket_map[stack[-1]] != char:\n                return False\n            stack.pop()"], [0.9117041826248169, "    open_brackets = 0\n    for char in s:\n        if char == '(':\n            open_brackets += 1\n        elif char == ')':\n            if open_brackets == 0:\n                return False\n            open_brackets -= 1\n    return open_brackets == 0"], [0.910494863986969, "    for char in expr:\n        if char == '(':\n            open_brackets += 1\n        elif char == ')':\n            open_brackets -= 1\n        if open_brackets < 0:\n            return False"], [0.9101969599723816, "    for i, char in enumerate(string):\n        if char in brackets:\n            stack.append((char, i))\n        elif len(stack) == 0 or brackets[stack.pop()[0]] != char:\n            return (False, 'Position ' + str(i))"], [0.9101179838180542, "    for char in input_string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if not stack or stack.pop() != bracket_pairs[char]:\n                return False"]]}
{"task_id": "HumanEval/62", "problem": [[0.927435040473938, "    p = np.poly1d(xs[::-1])\n    derivative = p.deriv().c[::-1]\n    integral = p.integ().c[::-1]\n    integral[0] += C\n    derivative = list(filter(lambda a: a != 0, derivative))\n    integral = list(filter(lambda a: a != 0, integral))\n    return (derivative, integral)"], [0.9247652292251587, "    derivative = []\n    integral = [C]\n    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n        if i + 1 != 0:\n            integral.append(xs[i] / (i + 1))\n    while integral[-1] == 0:\n        integral = integral[:-1]\n    while derivative and derivative[-1] == 0:\n        derivative = derivative[:-1]\n    return (derivative, integral)"], [0.9247633814811707, "    derivative = []\n    integral = [C]\n    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n        if i + 1 != 0:\n            integral.append(xs[i] / (i + 1))\n    while integral[-1] == 0:\n        integral = integral[:-1]\n    while derivative and derivative[-1] == 0:\n        derivative = derivative[:-1]\n    return (derivative, integral)"], [0.9245197176933289, "    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n        if i + 1 != 0:\n            integral.append(xs[i] / (i + 1))"], [0.9245103001594543, "    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n        if i + 1 != 0:\n            integral.append(xs[i] / (i + 1))"], [0.9224339127540588, "    derivative = []\n    integral = [C]\n    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n            integral.append(xs[i - 1] / i)\n        else:\n            derivative.append(0)\n            integral.append(xs[0])\n    while derivative and derivative[-1] == 0:\n        derivative.pop()\n    return (derivative, integral)"], [0.9222123622894287, "    for i in range(len(xs)):\n        if i > 0:\n            derivative.append(i * xs[i])\n        if i > 0:\n            integral.append(xs[i - 1] / i)"], [0.9221598505973816, "    if not xs:\n        return ([], [C])\n    derivative = []\n    integral = [C]\n    for i in range(len(xs)):\n        if i > 0:\n            derivative.append(i * xs[i])\n        if i > 0:\n            integral.append(xs[i - 1] / i)\n    integral.append(xs[-1] / len(xs))\n    while derivative and derivative[-1] == 0:\n        derivative.pop()\n    while len(integral) > 1 and integral[-1] == 0:\n        integral.pop()\n    return (derivative, integral)"], [0.9212324619293213, "    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n            integral.append(xs[i - 1] / i)\n        else:\n            derivative.append(0)\n            integral.append(xs[0])"], [0.9210360050201416, "    for i in range(len(xs)):\n        if i != 0:\n            derivative.append(i * xs[i])\n            integral.append(xs[i - 1] / i)\n        else:\n            derivative.append(0)"]]}
{"task_id": "HumanEval/63", "problem": [[0.9324117302894592, "    elif n == 2:\n        return 1\n    elif n > 2:\n        return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)\n    elif n < 0:\n        return fibfib(n + 3) - fibfib(n + 2) - fibfib(n + 1)"], [0.9320661425590515, "    if n == 0:\n        return 0\n    elif n == 1:\n        return 0\n    elif n == 2:\n        return 1\n    elif n > 2:\n        return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)\n    elif n < 0:\n        return fibfib(n + 3) - fibfib(n + 2) - fibfib(n + 1)"], [0.9320661425590515, "    if n == 0:\n        return 0\n    elif n == 1:\n        return 0\n    elif n == 2:\n        return 1\n    elif n > 2:\n        return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)\n    elif n < 0:\n        return fibfib(n + 3) - fibfib(n + 2) - fibfib(n + 1)"], [0.9319714307785034, "    elif n == 1:\n        return 0\n    elif n == 2:\n        return 1\n    elif n > 2:\n        return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)\n    elif n < 0:\n        return fibfib(n + 3) - fibfib(n + 2) - fibfib(n + 1)"], [0.9311102628707886, "    if n < 0:\n        raise ValueError('Negative arguments are not supported.')\n    if n < 3:\n        return [0, 0, 1][n]\n    else:\n        fibfib = [0, 0, 1] + [0] * (n - 2)\n        for i in range(3, n + 1):\n            fibfib[i] = fibfib[i - 1] + fibfib[i - 2] + fibfib[i - 3]\n        return fibfib[n]"], [0.9294782876968384, "    elif n > 2:\n        return fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)\n    elif n < 0:\n        return fibfib(n + 3) - fibfib(n + 2) - fibfib(n + 1)"], [0.926540732383728, "    if n < 0:\n        raise ValueError('Error: Invalid input')\n    fibfib_values = [0, 0, 1] + [0] * (n - 2)\n    for i in range(3, n + 1):\n        fibfib_values[i] = fibfib_values[i - 1] + fibfib_values[i - 2] + fibfib_values[i - 3]\n    return fibfib_values[n]"], [0.9255918860435486, "    if n == 0:\n        fib_cache[n] = 0\n    elif n == 1:\n        fib_cache[n] = 0\n    elif n == 2:\n        fib_cache[n] = 1\n    elif n in fib_cache:\n        return fib_cache[n]\n    else:\n        fib_cache[n] = fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)"], [0.9255732297897339, "    if n == 0:\n        fib_cache[n] = 0\n    elif n == 1:\n        fib_cache[n] = 0\n    elif n == 2:\n        fib_cache[n] = 1\n    elif n in fib_cache:\n        return fib_cache[n]\n    else:\n        fib_cache[n] = fibfib(n - 1) + fibfib(n - 2) + fibfib(n - 3)"], [0.925527811050415, "    if n < 3:\n        return [0, 0, 1][n]\n    else:\n        fibfib = [0, 0, 1] + [0] * (n - 2)\n        for i in range(3, n + 1):\n            fibfib[i] = fibfib[i - 1] + fibfib[i - 2] + fibfib[i - 3]\n        return fibfib[n]"]]}
{"task_id": "HumanEval/64", "problem": [[0.9379554986953735, "    if type(s) != str:\n        raise ValueError('Invalid input, please provide a string.')\n    s = s.lower()\n    vowels = 'aeiou'\n    s = ''.join((char for char in s if char.isalpha()))\n    count = sum((1 for char in s if char in vowels))\n    s = s.split()\n    count += sum((1 for word in s if word.endswith('y')))\n    return count"], [0.9360778331756592, "    if type(s) != str:\n        raise TypeError('Input must be a string!')\n    vowels = 'aeiou'\n    s = s.lower()\n    count = 0\n    for char in s:\n        if char in vowels:\n            count += 1\n    if s[-1] == 'y':\n        count += 1\n    return count"], [0.9355736970901489, "    vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']\n    count = 0\n    for letter in word:\n        if letter in vowels:\n            count += 1\n    return count"], [0.9345531463623047, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    count = 0\n    s = s.lower()\n    for i in range(len(s)):\n        if s[i] in vowels:\n            count += 1\n        elif s[i] == 'y' and i == len(s) - 1:\n            count += 1\n    return count"], [0.9345407485961914, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    count = 0\n    s = s.lower()\n    for i in range(len(s)):\n        if s[i] in vowels:\n            count += 1\n        elif s[i] == 'y' and i == len(s) - 1:\n            count += 1\n    return count"], [0.9334993362426758, "    vowels = 'aeiou'\n    s = s.lower()\n    count = 0\n    for i in s:\n        if i in vowels:\n            count += 1\n    if s[-1] == 'y':\n        count += 1\n    return count"], [0.9331676363945007, "    if not isinstance(s, str):\n        raise TypeError('Input must be a string.')\n    vowels = 'aeiou'\n    s = s.lower()\n    count = sum((1 for char in s if char in vowels))\n    if s[-1] == 'y':\n        count += 1\n    return count"], [0.932753324508667, "    vowels = 'aeiouy'\n    special_vowels = '\u00e0\u00e8\u00ec\u00f2\u00f9\u00ec\u00e9\u00eb\u00ef\u00fc\u00f8\u00e9\u00ea\u00ef\u00f4\u0153\u00f9'\n    if not isinstance(s, str):\n        return 'Error: Input must be a string'\n    if not all((char.isalpha() or char.isspace() or char in special_vowels for char in s)):\n        return 'Error: Input must contain only alphabetical characters'\n    s = s.lower()\n    count = sum((1 for char in s if char in vowels))\n    if s[-1] in 'y':\n        count += 1\n    return count"], [0.9327421188354492, "    vowels = 'aeiouAEIOU'\n    count = 0\n    for char in word:\n        if char in vowels:\n            count += 1\n    return count"], [0.9327402114868164, "    vowels = 'aeiouAEIOU'\n    count = 0\n    for char in word:\n        if char in vowels:\n            count += 1\n    return count"]]}
{"task_id": "HumanEval/65", "problem": [[0.8990480899810791, "    lengthOfX, result = (0, 0)\n    tempX = x\n    while tempX != 0:\n        tempX //= 10\n        lengthOfX += 1\n    if shift >= lengthOfX:\n        while x != 0:\n            result = result * 10 + x % 10\n            x //= 10\n    else:\n        rightPart = x % 10 ** shift\n        leftPart = x // 10 ** shift\n        multiplier = 10 ** (lengthOfX - shift)\n        result = rightPart * multiplier + leftPart\n    return result"], [0.8956949710845947, "    if shift >= lengthOfX:\n        while x != 0:\n            result = result * 10 + x % 10\n            x //= 10\n    else:\n        rightPart = x % 10 ** shift\n        leftPart = x // 10 ** shift\n        multiplier = 10 ** (lengthOfX - shift)\n        result = rightPart * multiplier + leftPart"], [0.8944485783576965, "    if not isinstance(string, str):\n        raise TypeError('The first argument must be a string.')\n    if not isinstance(shift_value, int):\n        raise TypeError('The second argument must be an integer.')\n    if len(string) == 0:\n        raise ValueError('The string cannot be empty.')\n    shift_value %= len(string)\n    string = string[-shift_value:] + string[:-shift_value]\n    return string"], [0.8943771123886108, "    shift_total = sum((i * -1 if d == 0 else i for d, i in shift))\n    shift_total = shift_total % len(s)\n    return s[-shift_total:] + s[:-shift_total]"], [0.8887749910354614, "    if not isinstance(string, str):\n        raise ValueError('Input must be a string.')\n    if not isinstance(reverse_val, int):\n        raise ValueError('The reversal value must be an integer.')\n    if len(string) == 0 or string.isspace():\n        raise ValueError('The string must be nonempty and contain non-whitespace characters.')\n    if reverse_val == 0:\n        raise ValueError('The reversal value cannot be zero.')\n    reverse_val %= len(string)\n    if reverse_val < 0:\n        reverse_val += len(string)\n    return string[-reverse_val:] + string[:-reverse_val]"], [0.8868898153305054, "    if not isinstance(input_string, str):\n        raise Exception('First input must be a string')\n    if not isinstance(reversal_value, int):\n        raise Exception('Second input must be an integer')\n    if not input_string:\n        raise Exception(\"Input string can't be empty\")\n    reversal_value = reversal_value % len(input_string)\n    input_string = list(input_string)\n    if reversal_value > 0:\n        for _ in range(reversal_value):\n            input_string.insert(0, input_string.pop())\n    else:\n        for _ in range(abs(reversal_value)):\n            input_string.append(input_string.pop(0))\n    return ''.join(input_string)"], [0.8859519958496094, "    assert isinstance(string, str), 'Input must be a string'\n    assert isinstance(num_chars, int), 'Reversal value must be an integer'\n    num_chars %= len(string)\n    return string[-num_chars:] + string[:-num_chars]"], [0.8841220140457153, "    if shift >= 0:\n        return lst[shift:] + lst[:shift]\n    else:\n        return lst[shift:] + lst[:shift + len(lst)]"], [0.8835864067077637, "    number_str = str(number)\n    if number < 0:\n        number_str = number_str[1:]\n        reversed_str = number_str[::-1]\n        reversed_str = '-' + reversed_str\n    else:\n        reversed_str = number_str[::-1]\n    reversed_digits = []\n    for char in reversed_str:\n        reversed_digits.append(char)\n    return reversed_digits"], [0.8834429979324341, "    if len(lst) == 0:\n        return []\n    shift = shift % len(lst)\n    shifted_lst = []\n    if shift >= 0:\n        shifted_lst = lst[shift:] + lst[:shift]\n    else:\n        shifted_lst = lst[shift:] + lst[:shift]\n    return shifted_lst"]]}
{"task_id": "HumanEval/66", "problem": [[0.9281196594238281, "    return sum((ord(ch) for ch in s if ch.isupper()))"], [0.928115725517273, "    return sum((ord(ch) for ch in s if ch.isupper()))"], [0.9269676208496094, "    sum = 0\n    for c in x:\n        if 'A' <= c <= 'Z':\n            sum += ord(c)\n    return sum"], [0.9223562479019165, "    ascii_sum = 0\n    for char in string:\n        if char.isalpha():\n            ascii_sum += ord(char)\n    return ascii_sum"], [0.9160513877868652, "    for c in x:\n        if 'A' <= c <= 'Z':\n            sum += ord(c)"], [0.9158889055252075, "    sum_ascii = 0\n    for char in string:\n        sum_ascii += ord(char)\n    return sum_ascii"], [0.9144351482391357, "    return sum([ord(w[0]) for w in s.split()])"], [0.9122053384780884, "        for i in s:\n            ascii_val = ord(i)\n            print(f'ASCII value of {i} is {ascii_val}')\n            total_sum += ascii_val"], [0.9115537405014038, "    return sum([ord(c) for c in s])"], [0.9107525944709778, "    total_sum = 0\n    for s in strings:\n        for i in s:\n            ascii_val = ord(i)\n            print(f'ASCII value of {i} is {ascii_val}')\n            total_sum += ascii_val\n    return total_sum"]]}
{"task_id": "HumanEval/67", "problem": [[0.924994707107544, "    fruits = list(map(int, re.findall('\\\\d+', s)))\n    apples, oranges = (fruits[0], fruits[1])\n    return n - apples - oranges"], [0.8937680721282959, "    for distr in s:\n        fruit, count = distr.split()\n        fruits_count[fruit] = int(count)"], [0.8931891322135925, "    fruit_counts = {fruit: 0 for fruit in fruits}\n    for fruit in s:\n        count, fruit_type = fruit.split(' ')\n        fruit_counts[fruit_type] = int(count)\n    total_specified_fruits = sum(fruit_counts.values())\n    unspecified_fruits = {fruit: n - total_specified_fruits for fruit in fruit_counts if fruit_counts[fruit] == 0}\n    return unspecified_fruits"], [0.8917195796966553, "    result = {}\n    total_specified = 0\n    for fruit in s:\n        quantity = int(fruit.split(' ')[0])\n        total_specified += quantity\n    remaining_fruits = n - total_specified\n    for fruit in fruits:\n        if fruit not in s:\n            if remaining_fruits > max_quantity:\n                raise ValueError('Total quantity exceeds maximum allowed quantity for fruit type.')\n            else:\n                result[fruit] = remaining_fruits\n    return result"], [0.8907132148742676, "    fruit_dict = {}\n    for fruit in s:\n        fruit_name, count = fruit.split()\n        fruit_dict[fruit_name] = int(count)\n    for fruit in fruits:\n        if fruit in servings:\n            n -= servings[fruit]\n            if n < 0:\n                raise ValueError('Not enough fruits for the servings.')\n    if n % len(fruits) != 0:\n        raise ValueError('Cannot equally distribute remaining fruits.')\n    remaining_per_fruit = n // len(fruits)\n    result = {}\n    for fruit in fruits:\n        if fruit not in fruit_dict:\n            result[fruit] = remaining_per_fruit\n    return result"], [0.88887619972229, "    for record in s:\n        record = record.split(' ')\n        quantity = int(record[0])\n        fruit = record[1]\n        distribution[fruit] += quantity\n        n -= quantity * fruit_prices[fruit]"], [0.8883052468299866, "    distribution = {}\n    for fruit in fruits:\n        distribution[fruit] = 0\n    for record in s:\n        record = record.split(' ')\n        quantity = int(record[0])\n        fruit = record[1]\n        distribution[fruit] += quantity\n        n -= quantity * fruit_prices[fruit]\n    for fruit in fruits:\n        if distribution[fruit] == 0:\n            distribution[fruit] = n // fruit_prices[fruit]\n            n -= distribution[fruit] * fruit_prices[fruit]\n    return {k: v for k, v in distribution.items() if v > 0}"], [0.886786699295044, "    if multiplier < 0 or multiplier > 100:\n        raise ValueError('Multiplier is not valid. It should range from 0 to 100')\n    fruit_dict = {item.split(' ')[1]: int(item.split(' ')[0]) for item in fruits}\n    non_fruit_dict = {item.split(' ')[1]: int(item.split(' ')[0]) for item in non_fruit_items}\n    if n < sum(fruit_dict.values()) + sum(non_fruit_dict.values()):\n        return 'Error'\n    if s % 2 != 0:\n        fruit_dict = {k: v * multiplier for k, v in fruit_dict.items()}\n    fruit_dict = {k: v for k, v in fruit_dict.items() if v > 0}\n    non_fruit_dict = {k: v for k, v in non_fruit_dict.items() if v > 0}\n    return (fruit_dict, non_fruit_dict)"], [0.8850457668304443, "    if apples < 0 or oranges < 0:\n        return 'Error: The counts cannot be negative.'\n    else:\n        return apples + oranges"], [0.8850457668304443, "    if apples < 0 or oranges < 0:\n        return 'Error: The counts cannot be negative.'\n    else:\n        return apples + oranges"]]}
{"task_id": "HumanEval/68", "problem": [[0.9207025766372681, "    result = []\n    even_nodes = []\n    for idx, node in enumerate(nodes):\n        if node % 2 == 0 and node != 0:\n            even_nodes.append((node, idx))\n    if even_nodes:\n        even_nodes.sort()\n        min_val = even_nodes[0][0]\n        for node, idx in even_nodes:\n            if node == min_val:\n                result = [node, idx]\n    return result"], [0.9165580868721008, "    if type(lst) is not list:\n        return 'Error: The provided input is not a list!'\n    smallest_even = float('inf')\n    smallest_even_indices = []\n    for i in range(len(lst)):\n        if type(lst[i]) is not int:\n            return 'Error: List contains non-integer values!'\n        if lst[i] % 2 == 0 and lst[i] < smallest_even:\n            smallest_even = lst[i]\n            smallest_even_indices = [i]\n        elif lst[i] == smallest_even:\n            smallest_even_indices.append(i)\n    if smallest_even == float('inf'):\n        return 'No even number found!'\n    else:\n        return (smallest_even, smallest_even_indices)"], [0.9159443378448486, "    smallest_even = smallest_odd = [float('inf'), -1]\n    for idx, val in enumerate(nodes):\n        if val % 2 == 0 and val < smallest_even[0]:\n            smallest_even = [val, idx]\n        elif val % 2 != 0 and val < smallest_odd[0]:\n            smallest_odd = [val, idx]\n    smallest_nodes = []\n    if smallest_even[1] != -1:\n        smallest_nodes.append(smallest_even)\n    if smallest_odd[1] != -1:\n        smallest_nodes.append(smallest_odd)\n    return smallest_nodes"], [0.9138013124465942, "    min_even_node, min_even_val = (None, float('inf'))\n    for node in nodes:\n        if node.value < min_even_val and node.value % 2 == 0:\n            min_even_node, min_even_val = (node, node.value)\n        elif node.value == min_even_val:\n            min_even_node = node\n    if min_even_node is None:\n        return []\n    else:\n        return [min_even_node]"], [0.9118924140930176, "    second_smallest_even = float('inf')\n    indices = []\n    for i, num in enumerate(lst):\n        if num % 2 == 0 and num < second_smallest_even:\n            second_smallest_even = num\n            indices = [i]\n        elif num % 2 == 0 and num == second_smallest_even:\n            indices.append(i)\n    return indices"], [0.9091996550559998, "    smallest_even_node, smallest_odd_node = ([float('inf'), ''], [float('inf'), ''])\n    stack = [(root, path)]\n    while stack:\n        node, path = stack.pop()\n        if node['value'] % 2 == 0 and node['value'] < smallest_even_node[0]:\n            smallest_even_node = [node['value'], path]\n        elif node['value'] % 2 == 1 and node['value'] < smallest_odd_node[0]:\n            smallest_odd_node = [node['value'], path]\n        if node['right']:\n            stack.append((node['right'], path + '->' + str(node['right']['value'])))\n        if node['left']:\n            stack.append((node['left'], path + '->' + str(node['left']['value'])))\n    return ([smallest_even_node] if smallest_even_node[0] != float('inf') else []) + ([smallest_odd_node] if smallest_odd_node[0] != float('inf') else [])"], [0.9035148620605469, "        if val % 2 == 0 and val < smallest_even[0]:\n            smallest_even = [val, idx]\n        elif val % 2 != 0 and val < smallest_odd[0]:\n            smallest_odd = [val, idx]"], [0.9026234149932861, "    even_list = [num for num in lst if num % 2 == 0]\n    return min(even_list) if even_list else None"], [0.9023441672325134, "    even_numbers = [num for num in lst if num % 2 == 0]\n    if even_numbers:\n        return min(even_numbers)\n    else:\n        return 'Element does not exist'"], [0.9014334678649902, "    for i in range(len(lst)):\n        if type(lst[i]) is not int:\n            return 'Error: List contains non-integer values!'\n        if lst[i] % 2 == 0 and lst[i] < smallest_even:\n            smallest_even = lst[i]\n            smallest_even_indices = [i]\n        elif lst[i] == smallest_even:\n            smallest_even_indices.append(i)"]]}
{"task_id": "HumanEval/69", "problem": [[0.9129770994186401, "    freq = {}\n    for num in lst:\n        if num in freq:\n            freq[num] += 1\n        else:\n            freq[num] = 1\n    greatest = -1\n    for num, count in freq.items():\n        if count >= num * num:\n            greatest = max(greatest, num)\n    return greatest"], [0.9088579416275024, "    freq_count = {}\n    for num in lst:\n        if num > 0:\n            if num not in freq_count:\n                freq_count[num] = 1\n            else:\n                freq_count[num] += 1\n    sorted_freq_count = sorted(freq_count.items(), key=lambda x: x[1], reverse=True)\n    if sorted_freq_count:\n        return sorted_freq_count[0][0]\n    else:\n        return None"], [0.9082995653152466, "    index = -1\n    for i in range(len(lst)):\n        if lst[i] == 7:\n            index = i\n            break\n    if index == -1:\n        return -1\n    else:\n        return index"], [0.9079490900039673, "    freq_counter = {}\n    for n in lst:\n        if n in freq_counter:\n            freq_counter[n] += 1\n        else:\n            freq_counter[n] = 1\n    rare_values = [n for n in freq_counter if freq_counter[n] <= n // 2]\n    if not rare_values:\n        return -1\n    return min(rare_values)"], [0.9071341753005981, "    freq = {}\n    for i in lst:\n        freq[i] = freq.get(i, 0) + 1\n    filtered = [key for key, value in freq.items() if value <= key / 2]\n    if not filtered:\n        return -1\n    return min(filtered)"], [0.9063591957092285, "    index = -1\n    count = 0\n    longest_subseq_start = 0\n    longest_subseq_len = 0\n    current_subseq_start = 0\n    current_subseq_len = 0\n    for i in range(len(lst)):\n        if lst[i] == item:\n            if index == -1:\n                index = i\n            count += 1\n        if i > 0 and lst[i] == lst[i - 1] + 1:\n            if current_subseq_len == 0:\n                current_subseq_start = i - 1\n            current_subseq_len += 1\n        else:\n            if current_subseq_len > longest_subseq_len:\n                longest_subseq_start = current_subseq_start\n                longest_subseq_len = current_subseq_len\n            current_subseq_len = 0\n    if current_subseq_len > longest_subseq_len:\n        longest_subseq_start = current_subseq_start\n        longest_subseq_len = current_subseq_len\n    return (index, count, longest_subseq_start, longest_subseq_len)"], [0.9052175879478455, "    if not lst:\n        return 'Error: List is empty'\n    elif not all((isinstance(num, int) for num in lst)):\n        return 'Error: List contains non-integer elements'\n    else:\n        lst.sort(reverse=True)\n        for i in range(len(lst)):\n            if lst[i] == lst[i + 1]:\n                continue\n            else:\n                return lst[i]"], [0.9052175879478455, "    if not lst:\n        return 'Error: List is empty'\n    elif not all((isinstance(num, int) for num in lst)):\n        return 'Error: List contains non-integer elements'\n    else:\n        lst.sort(reverse=True)\n        for i in range(len(lst)):\n            if lst[i] == lst[i + 1]:\n                continue\n            else:\n                return lst[i]"], [0.9049245119094849, "    for el in lst:\n        if el > smallest:\n            return el"], [0.9048796892166138, "    for i in range(len(lst)):\n        if lst[i] == item:\n            if index == -1:\n                index = i\n            count += 1\n        if i > 0 and lst[i] == lst[i - 1] + 1:\n            if current_subseq_len == 0:\n                current_subseq_start = i - 1\n            current_subseq_len += 1\n        else:\n            if current_subseq_len > longest_subseq_len:\n                longest_subseq_start = current_subseq_start\n                longest_subseq_len = current_subseq_len\n            current_subseq_len = 0"]]}
{"task_id": "HumanEval/70", "problem": [[0.9067033529281616, "    if not lst:\n        return []\n    if len(lst) == 1:\n        return lst\n    max_value = max(lst)\n    lst.remove(max_value)\n    return [max_value] + sort_descending(lst)"], [0.9054127335548401, "    while len(lst) > 0:\n        min_value = min(lst)\n        out_lst.append(min_value)\n        lst.remove(min_value)\n        if len(lst) > 0:\n            max_value = max(lst)\n            out_lst.append(max_value)\n            lst.remove(max_value)"], [0.9015185832977295, "    res = []\n    lst_float = []\n    for item in lst:\n        try:\n            lst_float.append(float(item))\n        except ValueError:\n            pass\n    if lst_float == []:\n        return res\n    lst_float.sort()\n    while len(lst_float) > 0:\n        min_num = min(lst_float)\n        while min_num in lst_float:\n            res.append(min_num)\n            lst_float.remove(min_num)\n        if len(lst_float) > 0:\n            max_num = max(lst_float)\n            while max_num in lst_float:\n                lst_float.remove(max_num)\n            res.append(max_num)\n    return res"], [0.9005295634269714, "    odd_numbers = [num for num in lst if num % 2 != 0]\n    if len(odd_numbers) == 0:\n        return []\n    odd_numbers.sort(reverse=True)\n    odd_numbers = list(set(odd_numbers))\n    return odd_numbers"], [0.8999285101890564, "    sorted_list = []\n    while lst:\n        max_val = max(lst)\n        lst.remove(max_val)\n        sorted_list.append(max_val)\n    return sorted_list"], [0.8996865749359131, "        for num in lst:\n            if num > max_val:\n                second_max_val = max_val\n                max_val = num\n            elif num > second_max_val and num != max_val:\n                second_max_val = num\n            if num < min_val:\n                second_min_val = min_val\n                min_val = num\n            elif num < second_min_val and num != min_val:\n                second_min_val = num"], [0.8995206952095032, "    sorted_lst = []\n    while lst:\n        min_value = min(lst)\n        sorted_lst.append(min_value)\n        lst.remove(min_value)\n    return sorted_lst"], [0.8994662761688232, "        for num in lst:\n            if num > max_val:\n                second_max_val = max_val\n                max_val = num\n            elif num > second_max_val:\n                second_max_val = num\n            if num < min_val:\n                second_min_val = min_val\n                min_val = num\n            elif num < second_min_val:\n                second_min_val = num"], [0.8992816805839539, "    sorted_list = []\n    while len(lst) != 0:\n        maximum = None\n        for value in lst:\n            try:\n                if not maximum:\n                    maximum = value\n                elif value > maximum:\n                    maximum = value\n            except TypeError:\n                return 'Error: List contains non-comparable types.'\n        while maximum in lst:\n            lst.remove(maximum)\n        sorted_list.append(maximum)\n    return sorted_list"], [0.8991618156433105, "    for num in lst:\n        if num > max_value:\n            second_max_value = max_value\n            max_value = num\n        elif num > second_max_value and num != max_value:\n            second_max_value = num\n        if num < min_value:\n            second_min_value = min_value\n            min_value = num\n        elif num < second_min_value and num != min_value:\n            second_min_value = num"]]}
{"task_id": "HumanEval/71", "problem": [[0.9314859509468079, "    if a + b > c and a + c > b and (b + c > a):\n        p = (a + b + c) / 2.0\n        area = (p * (p - a) * (p - b) * (p - c)) ** 0.5\n        return round(area, 2)\n    else:\n        return -1"], [0.9314859509468079, "    if a + b > c and a + c > b and (b + c > a):\n        p = (a + b + c) / 2.0\n        area = (p * (p - a) * (p - b) * (p - c)) ** 0.5\n        return round(area, 2)\n    else:\n        return -1"], [0.9275043606758118, "    if a + b > c and b + c > a and (c + a > b):\n        if a == b == c:\n            triangle_type = 'Equilateral'\n        elif a == b or b == c or c == a:\n            triangle_type = 'Isosceles'\n        else:\n            triangle_type = 'Scalene'\n        s = (a + b + c) / 2\n        area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n        return (round(area, 2), triangle_type)\n    else:\n        return -1"], [0.9275043606758118, "    if a + b > c and b + c > a and (c + a > b):\n        if a == b == c:\n            triangle_type = 'Equilateral'\n        elif a == b or b == c or c == a:\n            triangle_type = 'Isosceles'\n        else:\n            triangle_type = 'Scalene'\n        s = (a + b + c) / 2\n        area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n        return (round(area, 2), triangle_type)\n    else:\n        return -1"], [0.927497148513794, "    if a + b > c and b + c > a and (c + a > b):\n        if a == b == c:\n            triangle_type = 'Equilateral'\n        elif a == b or b == c or c == a:\n            triangle_type = 'Isosceles'\n        else:\n            triangle_type = 'Scalene'\n        s = (a + b + c) / 2\n        area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n        return (round(area, 2), triangle_type)\n    else:\n        return -1"], [0.927497148513794, "    if a + b > c and b + c > a and (c + a > b):\n        if a == b == c:\n            triangle_type = 'Equilateral'\n        elif a == b or b == c or c == a:\n            triangle_type = 'Isosceles'\n        else:\n            triangle_type = 'Scalene'\n        s = (a + b + c) / 2\n        area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n        return (round(area, 2), triangle_type)\n    else:\n        return -1"], [0.9255488514900208, "    if a + b > c and a + c > b and (b + c > a):\n        s = (a + b + c) / 2\n        area = sqrt(s * (s - a) * (s - b) * (s - c))\n        return area\n    else:\n        return 'Invalid triangle'"], [0.9255488514900208, "    if a + b > c and a + c > b and (b + c > a):\n        s = (a + b + c) / 2\n        area = sqrt(s * (s - a) * (s - b) * (s - c))\n        return area\n    else:\n        return 'Invalid triangle'"], [0.9249489307403564, "    if a + b <= c or b + c <= a or c + a <= b:\n        return 'Invalid triangle'\n    s = (a + b + c) / 2\n    area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n    rounded_area = round(area)\n    return rounded_area"], [0.9248555898666382, "    if a + b > c and a + c > b and (b + c > a):\n        s = (a + b + c) / 2\n        area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n        return area\n    else:\n        return 'The provided dimensions do not form a valid triangle.'"]]}
{"task_id": "HumanEval/72", "problem": [[0.9124611020088196, "    if not isinstance(q, (list, tuple)):\n        return 'Non-sequence input'\n    if not all((isinstance(item, (int, float)) for item in q)):\n        return 'Non-numeric input'\n    if q != sorted(q) and q != sorted(q, reverse=True):\n        return 'Unsorted list error'\n    if q == q[::-1] and sum(q) <= w:\n        return True\n    else:\n        return False"], [0.9103405475616455, "    if not isinstance(q, (list, tuple, str)):\n        return 'Non-sequence input'\n    for i in q:\n        if not isinstance(i, (int, float)):\n            return 'Non-numeric input'\n    return is_palindrome(q) and sum(q) <= w"], [0.9067307114601135, "    q_len = len(q)\n    for i in range(q_len // 2):\n        if q[i] != q[q_len - 1 - i]:\n            return False\n    if sum(q) > w:\n        return False\n    return True"], [0.9055743217468262, "    if q == q[::-1]:\n        if sum(q) <= w:\n            return True\n        else:\n            return False\n    else:\n        return False"], [0.9055743217468262, "    if q == q[::-1]:\n        if sum(q) <= w:\n            return True\n        else:\n            return False\n    else:\n        return False"], [0.9053846597671509, "    if q == q[::-1] and sum(q) <= w:\n        return True\n    else:\n        return False"], [0.9053846597671509, "    if q == q[::-1] and sum(q) <= w:\n        return True\n    else:\n        return False"], [0.905364990234375, "    if q == q[::-1] and sum(q) <= w:\n        return True\n    else:\n        return False"], [0.9016804695129395, "    if all((isinstance(i, int) for i in q)):\n        if q == q[::-1] and sum((i for i in q)) <= w:\n            return True"], [0.9013283252716064, "    if len(q) > e and q == q[::-1] and (sum(q) <= w):\n        return True\n    else:\n        return False"]]}
{"task_id": "HumanEval/73", "problem": [[0.9133563041687012, "    changes = 0\n    for i in range(len(arr) // 2):\n        if arr[i] != arr[-i - 1]:\n            changes += 1\n        if changes > limit:\n            return -1\n    return changes"], [0.911381185054779, "    if arr == arr[::-1]:\n        return 0\n    n = len(arr)\n    l = 0\n    r = n - 1\n    counter = 0\n    changes = set()\n    while l <= r:\n        if arr[l] == arr[r]:\n            l += 1\n            r -= 1\n        else:\n            counter += 1\n            changes.add((min(arr[l], arr[r]), max(arr[l], arr[r])))\n            if len(changes) > limit:\n                return -1\n            arr[l] = arr[r] = min(arr[l], arr[r])\n            l += 1\n            r -= 1\n    return counter"], [0.9095230102539062, "    n = len(arr)\n    changes = 0\n    for i in range(n // 2):\n        if arr[i] != arr[n - 1 - i]:\n            changes += 1\n        if changes > limit:\n            break\n    return min(changes, limit)"], [0.9067809581756592, "    i, j = (0, len(arr) - 1)\n    changes = 0\n    unique_elements = set()\n    while i <= j:\n        if arr[i] != arr[j]:\n            changes += 1\n            if arr[i] not in unique_elements:\n                limit -= 1\n                if limit < 0:\n                    return changes\n                unique_elements.add(arr[i])\n            arr[j] = arr[i]\n        i += 1\n        j -= 1\n    return changes"], [0.90476393699646, "    n = len(arr)\n    count = 0\n    for i in range(n // 2):\n        if arr[i] != arr[n - i - 1]:\n            count += 1\n            if count > limit:\n                return count\n    return count"], [0.9043543934822083, "    for i in range(n // 2):\n        if arr[i] != arr[n - i - 1]:\n            count += 1\n            if count > limit:\n                return count"], [0.902381181716919, "    for i in range(len(arr) // 2):\n        if arr[i] != arr[-i - 1]:\n            changes += 1\n        if changes > limit:\n            return -1"], [0.9023770093917847, "    i, j = (0, len(arr) - 1)\n    count = 0\n    while i < j:\n        if arr[i] != arr[j]:\n            count += 1\n            if count > limit:\n                return -1\n            arr[j] = arr[i]\n        i += 1\n        j -= 1\n    return count"]]}
{"task_id": "HumanEval/74", "problem": [[0.9324888586997986, "    cleaned_lst1 = [str.replace(' ', '').lower() for str in lst1]\n    cleaned_lst2 = [str.replace(' ', '').lower() for str in lst2]\n    seen = set()\n    unique_lst1 = [string for string in lst1 if string.lower() not in seen and (not seen.add(string.lower()))]\n    unique_lst2 = [string for string in lst2 if string.lower() not in seen and (not seen.add(string.lower()))]\n    count_lst1 = sum([len(str) for str in cleaned_lst1])\n    count_lst2 = sum([len(str) for str in cleaned_lst2])\n    if count_lst1 <= count_lst2:\n        return unique_lst1\n    else:\n        return unique_lst2"], [0.9240758419036865, "    if total_chars1 <= total_chars2:\n        return lst1\n    else:\n        return lst2"], [0.9222332835197449, "    import re\n    lst1 = [re.sub('\\\\W+', '', s).lower() if not case_sensitive else re.sub('\\\\W+', '', s) for s in lst1]\n    lst2 = [re.sub('\\\\W+', '', s).lower() if not case_sensitive else re.sub('\\\\W+', '', s) for s in lst2]\n    lst1, lst2 = (list(dict.fromkeys(lst1)), list(dict.fromkeys(lst2)))\n    return lst1 if sum((len(s) for s in lst1)) <= sum((len(s) for s in lst2)) else lst2"], [0.9218987226486206, "    len1 = sum((len(word.replace(' ', '')) for word in lst1))\n    len2 = sum((len(word.replace(' ', '')) for word in lst2))\n    if len1 <= len2:\n        lst = lst1\n        other_lst = lst2\n    else:\n        lst = lst2\n        other_lst = lst1\n    res = []\n    other_set = set((str.lower() for str in other_lst))\n    for string in lst:\n        if string.lower() not in other_set:\n            res.append(string)\n            other_set.add(string.lower())\n    return res"], [0.919605016708374, "    lst1 = list(dict.fromkeys([i.lower() for i in lst1]))\n    lst2 = list(dict.fromkeys([i.lower() for i in lst2]))\n    lst1_no_space = [i.replace(' ', '') for i in lst1]\n    lst2_no_space = [i.replace(' ', '') for i in lst2]\n    if sum((i.isnumeric() for i in lst1_no_space)) > len(lst1_no_space) / 2 or sum((i.isnumeric() for i in lst2_no_space)) > len(lst2_no_space) / 2:\n        return []\n    count1 = sum((len(i) for i in lst1_no_space))\n    count2 = sum((len(i) for i in lst2_no_space))\n    if count1 <= count2:\n        return lst1\n    else:\n        return lst2"], [0.9188370108604431, "    lst1 = [string for string in lst1 if not any((char.isdigit() for char in string))]\n    lst2 = [string for string in lst2 if not any((char.isdigit() for char in string))]\n    seen1 = set()\n    seen2 = set()\n    lst1 = [x for x in lst1 if not (x.lower() in seen1 or seen1.add(x.lower()))]\n    lst2 = [x for x in lst2 if not (x.lower() in seen2 or seen2.add(x.lower()))]\n    len1 = sum((len(s.replace(' ', '')) for s in lst1))\n    len2 = sum((len(s.replace(' ', '')) for s in lst2))\n    if len1 <= len2:\n        return lst1\n    else:\n        return lst2"], [0.9165415167808533, "    lst1 = [re.sub('\\\\W+', '', s).lower() if not case_sensitive else re.sub('\\\\W+', '', s) for s in lst1]\n    lst2 = [re.sub('\\\\W+', '', s).lower() if not case_sensitive else re.sub('\\\\W+', '', s) for s in lst2]\n    lst1, lst2 = (list(dict.fromkeys(lst1)), list(dict.fromkeys(lst2)))\n    return lst1 if sum((len(s) for s in lst1)) <= sum((len(s) for s in lst2)) else lst2"], [0.9086713194847107, "    lst1 = sorted(set(lst1), key=lst1.index)\n    lst2 = sorted(set(lst2), key=lst2.index)\n    total_chars1, total_chars2, total_numeric = (0, 0, 0)\n    for word in lst1:\n        total_chars1 += len(word.replace(' ', ''))\n        total_numeric += sum((c.isdigit() for c in word))\n    for word in lst2:\n        total_chars2 += len(word.replace(' ', ''))\n        total_numeric += sum((c.isdigit() for c in word))\n    total_chars = total_chars1 + total_chars2\n    if total_numeric / total_chars > 0.3:\n        return []\n    if total_chars1 <= total_chars2:\n        return lst1\n    else:\n        return lst2"], [0.9073697924613953, "    if ignore_nums:\n        lst1 = [''.join(filter(lambda x: not x.isdigit(), s)) for s in lst1]\n        lst2 = [''.join(filter(lambda x: not x.isdigit(), s)) for s in lst2]\n    if unique_chars:\n        lst1 = [''.join(sorted(s.lower())) for s in lst1]\n        lst2 = [''.join(sorted(s.lower())) for s in lst2]\n    results = [s for s in lst2 if s in lst1]\n    return results"], [0.9064405560493469, "    if not list1 and (not list2):\n        return (None, None)\n    if not list1:\n        list1.append('')\n    if not list2:\n        list2.append('')\n    max_word1 = min(sorted([(len(set(word.lower())), word) for word in list1]))[1]\n    max_word2 = min(sorted([(len(set(word.lower())), word) for word in list2]))[1]\n    return (max_word1, max_word2)"]]}
{"task_id": "HumanEval/75", "problem": [[0.9212557673454285, "    prime_factors = []\n    for i in range(2, a + 1):\n        if a % i == 0 and is_prime(i):\n            prime_factors.append(i)\n    if len(prime_factors) == 3:\n        product = 1\n        for factor in prime_factors:\n            product *= factor\n        if product == a:\n            return True\n    return False"], [0.9117467403411865, "    if len(prime_factors) == 3:\n        product = 1\n        for factor in prime_factors:\n            product *= factor\n        if product == a:\n            return True"], [0.9088541865348816, "    for possible_factor in range(2, a):\n        if a % possible_factor == 0 and is_prime(possible_factor):\n            primes.append(possible_factor)\n            a = a // possible_factor\n        if len(primes) > 3:\n            return 'Not a product of 3 distinct prime numbers.'"], [0.9088271856307983, "    primes = get_distinct_primes(a)\n    return len(primes) == 3"]]}
{"task_id": "HumanEval/76", "problem": [[0.9209518432617188, "    if x <= 0 or y <= 0 or (not isinstance(x, int)) or (not isinstance(y, int)):\n        return False\n    power = 0\n    while x ** power <= y:\n        if x ** power == y:\n            return True\n        power += 1\n    return False"], [0.9116774201393127, "    if not (isinstance(x, int) and isinstance(y, int)):\n        return 'Error: Both inputs must be integers.'\n    if x in [-1, 1]:\n        return y == x\n    if x == 0 and y != 0:\n        return True\n    elif y == 0 and x != 0:\n        return True\n    if y == 1:\n        return False\n    while y != 1:\n        if y % x != 0:\n            return False\n        y = y // x\n    return True"], [0.9116694927215576, "    if x <= 0 or not isinstance(x, int) or isinstance(x, float):\n        return False\n    if y <= 0 or not isinstance(y, int) or isinstance(y, float):\n        return False\n    if x == 1:\n        return y == 1\n    power = 0\n    while y % x == 0:\n        y = y / x\n        power += 1\n    return y == 1"], [0.9096775054931641, "    if n == 0:\n        return 1\n    elif n < 0:\n        return 1 / power(x, -n)\n    else:\n        partial = power(x, n // 2)\n        result = partial * partial\n        if n % 2 == 1:\n            result *= x\n        return result"], [0.9096775054931641, "    if n == 0:\n        return 1\n    elif n < 0:\n        return 1 / power(x, -n)\n    else:\n        partial = power(x, n // 2)\n        result = partial * partial\n        if n % 2 == 1:\n            result *= x\n        return result"], [0.9080367088317871, "    if n <= 1:\n        return False\n    for a in range(2, int(math.sqrt(n)) + 1):\n        b = math.log(n, a)\n        if b.is_integer() and a ** int(b) == n:\n            return True\n    return False"], [0.9070392847061157, "    elif n < 0:\n        return 1 / power(x, -n)\n    else:\n        partial = power(x, n // 2)\n        result = partial * partial\n        if n % 2 == 1:\n            result *= x\n        return result"], [0.9066441059112549, "    if n <= 0:\n        return False\n    sqroot = int(n ** 0.5)\n    if int(sqroot ** 2) == n:\n        return True\n    else:\n        return False"], [0.9064412713050842, "    if n == 0:\n        return 1\n    temp_result = power(x, int(n / 2))\n    if n % 2 == 0:\n        return temp_result * temp_result\n    elif n > 0:\n        return x * temp_result * temp_result\n    else:\n        return temp_result * temp_result / x"], [0.9061049818992615, "    square_root = math.sqrt(n)\n    return square_root.is_integer()"]]}
{"task_id": "HumanEval/77", "problem": [[0.9359630346298218, "    a = abs(a)\n    root = round(a ** (1 / 3))\n    return root ** 3 == a"], [0.9356940984725952, "    cube_root = round(n ** (1 / 3))\n    return cube_root ** 3 == n"], [0.9356825947761536, "    cube_root = round(n ** (1 / 3))\n    return cube_root ** 3 == n"], [0.9356069564819336, "    cube_root = n ** (1 / 3.0)\n    return round(cube_root) ** 3 == n"], [0.93504798412323, "    cube_root = round(n ** (1.0 / 3))\n    return cube_root ** 3 == n"], [0.9329211711883545, "    cube_root = round(num ** (1 / 3))\n    return cube_root ** 3 == num"], [0.9314131140708923, "    cbrt = int(round(n ** (1 / 3)))\n    return cbrt * cbrt * cbrt == n"], [0.9284152984619141, "    root = round(n ** (1 / 3))\n    return root ** 3 == n"], [0.928362250328064, "    if not isinstance(n, (int, float)) or n < 0:\n        raise ValueError('Input must be a non-negative number')\n    i = 0\n    while i * i * i <= n:\n        if i * i * i == n:\n            return True\n        i += 1\n    return False"], [0.9254531860351562, "    if n < 0:\n        return False\n    root = n ** (1.0 / 3.0)\n    return round(root) ** 3 == n"]]}
{"task_id": "HumanEval/78", "problem": [[0.8991833925247192, "    for seperator in sep:\n        if seperator in s:\n            return s.split(seperator)\n    upper_case_chars = [char for char in s if char.isupper()]\n    total = sum((1 for char in upper_case_chars if is_prime(ord(char) - ord('A'))))\n    return total"], [0.8950701951980591, "    count = 0\n    upper_vowels = ('A', 'E', 'I', 'O', 'U')\n    for i in range(len(s)):\n        if is_prime(i) and s[i] in upper_vowels:\n            count += 1\n    return count"], [0.8942976593971252, "    primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]\n    prime_chars = []\n    for char in stringA:\n        if char.isalpha() and ord(char) in primes:\n            prime_chars.append(char)\n    return prime_chars"], [0.8939042091369629, "    count = 0\n    upper_vowels = ['A', 'E', 'I', 'O', 'U']\n    for i in range(len(s)):\n        if is_prime(i) and s[i] in upper_vowels:\n            count += 1\n    return count"], [0.8936193585395813, "    count = 0\n    for c in num:\n        if c in ['2', '3', '5', '7', 'B', 'D']:\n            count += 1\n    return count"], [0.8933451175689697, "    count = 0\n    for i in range(len(s)):\n        if is_prime(i + 1):\n            if s[i] in 'AEIOU':\n                count += 1\n    return count"], [0.8925343751907349, "    vowels = ['A', 'E', 'I', 'O', 'U']\n    return len([c for i, c in enumerate(s) if is_prime(i) and c in vowels])"], [0.8918024897575378, "    hex_to_bin_map = {'0': '0000', '1': '0001', '2': '0010', '3': '0011', '4': '0100', '5': '0101', '6': '0110', '7': '0111', '8': '1000', '9': '1001', 'A': '1010', 'B': '1011', 'C': '1100', 'D': '1101', 'E': '1110', 'F': '1111'}\n    binary_num = ''\n    for digit in hex_num:\n        binary_num += hex_to_bin_map[digit]\n    return binary_num"], [0.8916840553283691, "    if str.isupper():\n        return sum([1 for c in str if (ord(c) - ord('A')) % 2 == 0])\n    elif ' ' in str:\n        return str.split()"], [0.8915690183639526, "            elif int(hex_dec) == 12:\n                res += 'C'\n            elif int(hex_dec) == 13:\n                res += 'D'\n            elif int(hex_dec) == 14:\n                res += 'E'\n            elif int(hex_dec) == 15:\n                res += 'F'"]]}
{"task_id": "HumanEval/79", "problem": [[0.9199225902557373, "    binary = []\n    while decimal > 0:\n        binary.insert(0, decimal % 2)\n        decimal //= 2\n    return ''.join((str(bit) for bit in binary))"], [0.9186347723007202, "    if decimal % 2 == 0:\n        return decimal_to_binary(decimal // 2) + '0'"], [0.916945219039917, "    if decimal == 0:\n        return '0'\n    binary = decimal % 2\n    return str(decimal_to_binary(decimal // 2)) + str(binary)"], [0.9153889417648315, "    if decimal == 0:\n        return '0'\n    elif decimal == 1:\n        return '1'\n    else:\n        return decimal_to_binary(decimal // 2) + str(decimal % 2)"], [0.9153889417648315, "    if decimal == 0:\n        return '0'\n    elif decimal == 1:\n        return '1'\n    else:\n        return decimal_to_binary(decimal // 2) + str(decimal % 2)"], [0.9143929481506348, "    if decimal == 0:\n        return '0'\n    binary = ''\n    while decimal > 0:\n        remainder = decimal % 2\n        binary += str(remainder)\n        decimal //= 2\n    return binary[::-1]"], [0.9142754673957825, "    if decimal == 0:\n        return '0'\n    binary = ''\n    negative = False\n    if decimal < 0:\n        negative = True\n        decimal = abs(decimal)\n    while decimal > 0:\n        binary = str(decimal % 2) + binary\n        decimal //= 2\n    if negative:\n        binary = '-' + binary\n    return binary"], [0.9138781428337097, "    binary = []\n    while decimal > 0:\n        binary.append(decimal % 2)\n        decimal //= 2\n    return binary[::-1]"], [0.9138652682304382, "    if decimal == 0:\n        return '0'\n    binary = ''\n    while decimal > 0:\n        binary = str(decimal % 2) + binary\n        decimal = decimal // 2\n    return binary"], [0.9135996103286743, "    if decimal < 0:\n        return '-' + decimal_to_binary(-decimal)\n    if 'e' in str(decimal):\n        decimal = '{:.10f}'.format(decimal)\n        decimal = decimal.rstrip('0').rstrip('.')\n    if '.' in str(decimal):\n        whole, decimal = str(decimal).split('.')\n        whole = int(whole)\n        decimal = float('0.' + decimal)\n        return decimal_to_binary(whole) + '.' + decimal_to_binary(decimal)\n    if decimal == 0:\n        return '0'\n    return decimal_to_binary(decimal // 2) + str(decimal % 2)"]]}
{"task_id": "HumanEval/80", "problem": [[0.9038690328598022, "    if len(s) < 3:\n        return False\n    if len(set((s[i:i + 3] for i in range(len(s))))) < len(s) - 2:\n        return False\n    counter = Counter(s)\n    if any((value < 3 for value in counter.values())):\n        return False\n    if any((len(list(group)) >= 4 for key, group in groupby(s))):\n        return False\n    for key in counter.keys():\n        if len(set((s[i + 1] for i in range(len(s) - 1) if s[i] == key))) < 2:\n            return False\n    return True"], [0.9012349247932434, "    pattern_dict = {}\n    for i in range(len(s) - n + 1):\n        sequence = s[i:i + n]\n        if sequence in pattern_dict:\n            pattern_dict[sequence] += 1\n        else:\n            pattern_dict[sequence] = 1\n    all_happy = all((count >= 2 for count in pattern_dict.values()))\n    return ('happy' if all_happy else 'not happy', [pattern for pattern in pattern_dict.keys()])"], [0.9009674787521362, "    if not s.isalpha() or not s.islower():\n        return 'Error: Invalid Input. Please enter only lowercase alphabets.'\n    if len(s) < 3:\n        return False\n    alphabets_count = {}\n    sets = set()\n    for i in range(len(s) - 2):\n        subset = s[i:i + 3]\n        if subset in sets or subset[0] == subset[1] or subset[1] == subset[2]:\n            return False\n        sets.add(subset)\n        for c in subset:\n            if c in alphabets_count:\n                alphabets_count[c] += 1\n            else:\n                alphabets_count[c] = 1\n    count_even = list(filter(lambda c: c % 2 == 0, alphabets_count.values()))\n    count_odd = list(filter(lambda c: c % 2 != 0, alphabets_count.values()))\n    return len(count_odd) == 0 and len(count_even) < 3"], [0.9002488255500793, "    if not s.isalpha() or not s.islower():\n        return 'Error: Invalid Input. Please enter only lowercase alphabets.'\n    if len(s) < 3:\n        return False\n    alphabets_count = {}\n    sets = set()\n    for i in range(len(s) - 2):\n        subset = s[i:i + 3]\n        if subset in sets or subset[0] == subset[1] or subset[1] == subset[2]:\n            return False\n        sets.add(subset)\n        for c in subset:\n            if c in alphabets_count:\n                alphabets_count[c] += 1\n            else:\n                alphabets_count[c] = 1\n    count_even = list(filter(lambda c: c % 2 == 0, alphabets_count.values()))\n    count_odd = list(filter(lambda c: c % 2 != 0, alphabets_count.values()))\n    return len(count_odd) == 0 and len(count_even) <= 3"], [0.8958139419555664, "    if len(set((s[i:i + 3] for i in range(len(s))))) < len(s) - 2:\n        return False"]]}
{"task_id": "HumanEval/81", "problem": [[0.9334306716918945, "    elif 80 <= numerical_grade < 90:\n        letter_grade = 'B'\n        gpa = 3.0 + (numerical_grade - 80) / 10\n    elif 70 <= numerical_grade < 80:\n        letter_grade = 'C'\n        gpa = 2.0 + (numerical_grade - 70) / 10\n    elif 60 <= numerical_grade < 70:\n        letter_grade = 'D'\n        gpa = 1.0 + (numerical_grade - 60) / 10\n    else:\n        letter_grade = 'F'\n        gpa = 0.0"], [0.9325463771820068, "    if numerical_grade >= 90:\n        letter_grade = 'A'\n        gpa = 4.0\n    elif 80 <= numerical_grade < 90:\n        letter_grade = 'B'\n        gpa = 3.0 + (numerical_grade - 80) / 10\n    elif 70 <= numerical_grade < 80:\n        letter_grade = 'C'\n        gpa = 2.0 + (numerical_grade - 70) / 10\n    elif 60 <= numerical_grade < 70:\n        letter_grade = 'D'\n        gpa = 1.0 + (numerical_grade - 60) / 10\n    else:\n        letter_grade = 'F'\n        gpa = 0.0\n    return (letter_grade, round(gpa, 2))"], [0.9322755336761475, "    if numerical_grade >= 90:\n        letter_grade = 'A'\n        gpa = 4.0\n    elif 80 <= numerical_grade < 90:\n        letter_grade = 'B'\n        gpa = 3.0 + (numerical_grade - 80) / 10\n    elif 70 <= numerical_grade < 80:\n        letter_grade = 'C'\n        gpa = 2.0 + (numerical_grade - 70) / 10\n    elif 60 <= numerical_grade < 70:\n        letter_grade = 'D'\n        gpa = 1.0 + (numerical_grade - 60) / 10\n    else:\n        letter_grade = 'F'\n        gpa = 0.0"], [0.9318190813064575, "    elif 70 <= numerical_grade < 80:\n        letter_grade = 'C'\n        gpa = 2.0 + (numerical_grade - 70) / 10\n    elif 60 <= numerical_grade < 70:\n        letter_grade = 'D'\n        gpa = 1.0 + (numerical_grade - 60) / 10\n    else:\n        letter_grade = 'F'\n        gpa = 0.0"], [0.9263331890106201, "    elif gpa >= 3.7:\n        return 'A-'\n    elif gpa >= 3.3:\n        return 'B+'\n    elif gpa >= 3.0:\n        return 'B'\n    elif gpa >= 2.7:\n        return 'B-'\n    elif gpa >= 2.3:\n        return 'C+'\n    elif gpa >= 2.0:\n        return 'C'\n    elif gpa >= 1.7:\n        return 'C-'\n    elif gpa >= 1.3:\n        return 'D+'\n    elif gpa >= 1.0:\n        return 'D'\n    else:\n        return 'F'"], [0.925186812877655, "    elif 60 <= numerical_grade < 70:\n        letter_grade = 'D'\n        gpa = 1.0 + (numerical_grade - 60) / 10\n    else:\n        letter_grade = 'F'\n        gpa = 0.0"], [0.9245609045028687, "    try:\n        num_grade = float(num_grade)\n        assert 0 <= num_grade <= 100\n    except ValueError:\n        return 'Error: Grade must be a numerical value.'\n    except AssertionError:\n        return 'Error: Grade must be in the range 0 - 100.'\n    if num_grade >= 90:\n        letter = 'A'\n    elif num_grade >= 80:\n        letter = 'B'\n    elif num_grade >= 70:\n        letter = 'C'\n    elif num_grade >= 60:\n        letter = 'D'\n    else:\n        letter = 'F'\n    if letter != 'F':\n        if num_grade % 10 >= 7:\n            letter += '+'\n        elif num_grade % 10 < 3:\n            letter += '-'\n    return letter"], [0.9230833053588867, "    try:\n        num_grade = float(num_grade)\n        assert 0 <= num_grade <= 100\n    except ValueError:\n        return 'Error: Grade must be a numerical value.'\n    except AssertionError:\n        return 'Error: Grade must be in the range 0 - 100.'\n    letter = 'A' if num_grade >= 90 else 'B' if num_grade >= 80 else 'C' if num_grade >= 70 else 'D' if num_grade >= 60 else 'F'\n    if letter != 'F':\n        letter = letter + '+' if num_grade % 10 >= 7 else letter + '-' if num_grade % 10 < 3 else letter\n    return letter"], [0.922905683517456, "    if gpa >= 4.0:\n        return 'A'\n    elif gpa >= 3.7:\n        return 'A-'\n    elif gpa >= 3.3:\n        return 'B+'\n    elif gpa >= 3.0:\n        return 'B'\n    elif gpa >= 2.7:\n        return 'B-'\n    elif gpa >= 2.3:\n        return 'C+'\n    elif gpa >= 2.0:\n        return 'C'\n    elif gpa >= 1.7:\n        return 'C-'\n    elif gpa >= 1.3:\n        return 'D+'\n    elif gpa >= 1.0:\n        return 'D'\n    else:\n        return 'F'"], [0.922905683517456, "    if gpa >= 4.0:\n        return 'A'\n    elif gpa >= 3.7:\n        return 'A-'\n    elif gpa >= 3.3:\n        return 'B+'\n    elif gpa >= 3.0:\n        return 'B'\n    elif gpa >= 2.7:\n        return 'B-'\n    elif gpa >= 2.3:\n        return 'C+'\n    elif gpa >= 2.0:\n        return 'C'\n    elif gpa >= 1.7:\n        return 'C-'\n    elif gpa >= 1.3:\n        return 'D+'\n    elif gpa >= 1.0:\n        return 'D'\n    else:\n        return 'F'"]]}
{"task_id": "HumanEval/82", "problem": [[0.9385717511177063, "    length = len(string)\n    if is_prime(length):\n        return True\n    else:\n        return False"], [0.9293311238288879, "    length = len(string)\n    return is_prime(length)"], [0.929328203201294, "    length = len(string)\n    return is_prime(length)"], [0.9211979508399963, "    return is_prime(len(string))"], [0.9189767837524414, "    assert is_prime(4) == 'no'\n    assert is_prime(3) == 'yes'\n    assert is_prime(8) == 'no'"], [0.9177343845367432, "    for i in range(2, math.isqrt(length) + 1):\n        if length % i == 0:\n            return 'Composite'\n    else:\n        return 'Prime'"], [0.9174209237098694, "    length = len(array)\n    if is_prime(length):\n        print('The length of the array is a prime number.')\n    else:\n        print('The length of the array is a composite number.')"], [0.9164505004882812, "    if is_prime(length):\n        print('The length of the array is a prime number.')\n    else:\n        print('The length of the array is a composite number.')"], [0.9147790670394897, "    if is_prime(length):\n        return True\n    else:\n        return False"], [0.9142241477966309, "    if n > 1:\n        for i in range(2, n):\n            if n % i == 0:\n                is_prime = 'No'\n                break\n        else:\n            is_prime = 'Yes'\n    elif n == 1:\n        is_prime = 'No'\n    else:\n        return 'Error: Input should be greater than 0'"]]}
{"task_id": "HumanEval/83", "problem": [[0.9218134880065918, "    start = 10 ** (n - 1)\n    end = 10 ** n\n    numbers_with_one_ends = [i for i in range(start, end) if str(i)[0] == '1' or str(i)[-1] == '1']\n    return numbers_with_one_ends"], [0.9218064546585083, "    start = 10 ** (n - 1)\n    end = 10 ** n\n    numbers_with_one_ends = [i for i in range(start, end) if str(i)[0] == '1' or str(i)[-1] == '1']\n    return numbers_with_one_ends"], [0.9104087948799133, "    for num in range(10 ** (n - 1), upper_limit, step):\n        str_num = str(num)\n        if str_num[0] == str_num[-1] == '1' and (not any((digit in unwanted_digits for digit in str_num))):\n            count += 1"], [0.9076025485992432, "    if n <= 0 or not isinstance(n, int):\n        return 'The first parameter must be a positive integer.'\n    if n == 1:\n        return 'The function is not applicable for n = 1 because such a number cannot end and start with 1'\n    if x < 0 or y < 0 or (not isinstance(x, int)) or (not isinstance(y, int)):\n        return 'The second and third parameters must be non-negative integers.'\n    start = 10 ** (n - 1) + 1\n    end = 10 ** n\n    total = 0\n    for num in range(start, end, 15):\n        str_num = str(num)\n        if str_num[0] == str_num[-1] == '1' and str(x) not in str_num and (str(y) not in str_num):\n            total += 1\n    return total"], [0.9026767611503601, "    if n == 1:\n        return 'The function is not applicable for n = 1 because such a number cannot end and start with 1'"], [0.9016861319541931, "    start, end = (10 ** (n - 1), 10 ** n)\n    counter = 0\n    for i in range(start, end):\n        if int(str(i)[0]) == 1 or int(str(i)[-1]) == 1:\n            for prime in primes:\n                if i % prime == 0:\n                    counter += 1\n                    break\n    return counter"], [0.901678204536438, "    start, end = (10 ** (n - 1), 10 ** n)\n    counter = 0\n    for i in range(start, end):\n        if int(str(i)[0]) == 1 or int(str(i)[-1]) == 1:\n            for prime in primes:\n                if i % prime == 0:\n                    counter += 1\n                    break\n    return counter"], [0.8977203369140625, "    start = 10 ** (n - 1) + 1\n    end = 10 ** n\n    step = 10 if n == 1 else 100\n    numbers = list(range(start, end, step))\n    numbers.extend(list(range(start - 1, end - 1, step)))\n    count = 0\n    for num in numbers:\n        if is_prime(num) or is_fibonacci(num):\n            count += 1\n    return count"], [0.890810489654541, "    lower = 10 ** (num_digits - 1)\n    upper = 10 ** num_digits - 1\n    if upper < lower:\n        return -1\n    cnt = 0\n    total = 0\n    for num in range(lower, upper + 1):\n        if str(num)[0] == '1' or str(num)[-1] == '1':\n            if num % divisor == 0:\n                cnt += 1\n                total += num\n    return (cnt, total)"], [0.8907747268676758, "    lower = 10 ** (num_digits - 1)\n    upper = 10 ** num_digits - 1\n    if upper < lower:\n        return -1\n    cnt = 0\n    total = 0\n    for num in range(lower, upper + 1):\n        if str(num)[0] == '1' or str(num)[-1] == '1':\n            if num % divisor == 0:\n                cnt += 1\n                total += num\n    return (cnt, total)"]]}
{"task_id": "HumanEval/84", "problem": [[0.9075460433959961, "    binary = []\n    while n > 0:\n        binary.append(n % 2)\n        n = n // 2\n    binary = binary[::-1]\n    binary = ''.join(map(str, binary))\n    return binary"], [0.9069971442222595, "    num_as_binary = bin(int(num))[2:]\n    return num_as_binary"], [0.9067275524139404, "    binary = bin(num)\n    return binary[2:]"], [0.90666264295578, "    if num < 100 or num > 999:\n        return 'Invalid input. The number must be a three-digit number.'\n    binary = ''\n    while num > 0:\n        binary = str(num % 2) + binary\n        num //= 2\n    binary = binary.zfill(9)\n    return binary"], [0.9066399335861206, "    if n == 0:\n        return 0\n    s = ''\n    while n > 0:\n        if n % 2 == 0:\n            s = '0' + s\n        else:\n            s = '1' + s\n        n = n // 2\n    return s"], [0.9066122770309448, "    bin = []\n    while n != 0:\n        bin.append(n % 2)\n        n = n // 2\n    return ''.join((str(i) for i in bin[::-1]))"], [0.9060823917388916, "    binary = ''\n    if n == 0:\n        return '0'\n    while n > 0:\n        binary = str(n % 2) + binary\n        n = n // 2\n    return binary"], [0.9057472348213196, "    result = []\n    while n > 0:\n        result.append(n % 2)\n        n //= 2\n    return ''.join((str(x) for x in reversed(result)))"], [0.9057084321975708, "    if num == 0:\n        return '0'\n    binary = ''\n    num = abs(num)\n    while num > 0:\n        binary = str(num % 2) + binary\n        num = num // 2\n    return binary"], [0.9057022929191589, "    binary = ''\n    stack = []\n    while n > 0:\n        stack.append(n % 2)\n        n = n // 2\n    while stack:\n        binary += str(stack.pop())\n    return binary"]]}
{"task_id": "HumanEval/85", "problem": [[0.9330551624298096, "                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'"], [0.9330496788024902, "                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'"], [0.932725727558136, "    return sum((x for x in lst if x % 2 == 0))"], [0.9295152425765991, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9295117855072021, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9295116066932678, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9291999340057373, "    return sum((num for num in lst if num % 2 == 0))"], [0.9281501173973083, "            try:\n                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'\n            except Exception as e:\n                return f'An unexpected error occurred: {str(e)}'"], [0.9281338453292847, "            try:\n                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'\n            except Exception as e:\n                return f'An unexpected error occurred: {str(e)}'"], [0.9260724782943726, "    total = 0\n    for num in lst:\n        if num % 2 == 0:\n            total += num\n    return total"]]}
{"task_id": "HumanEval/86", "problem": [[0.9323215484619141, "    words = s.split()\n    for i, word in enumerate(words):\n        chars = list(word)\n        chars.sort()\n        words[i] = ''.join(chars)\n    s = ' '.join(words)\n    return s"], [0.9305096864700317, "    words = s.split()\n    sorted_words = [''.join(sorted(word)) for word in words]\n    return ' '.join(sorted_words)"], [0.9284158945083618, "    words = s.split(' ')\n    sorted_words = [''.join(sorted(word)) for word in words]\n    return ' '.join(sorted_words)"], [0.9268074631690979, "    unscrambled = ''\n    words = s.split(' ')\n    for i in range(len(words)):\n        unscrambled += intricate_sort(words[i]) + ' '\n    return unscrambled[:len(unscrambled) - 1]"], [0.922571063041687, "    sorted_words = [custom_sort(word) for word in s.split(' ')]\n    return ' '.join(sorted_words)"], [0.9225708246231079, "    sorted_words = [custom_sort(word) for word in s.split(' ')]\n    return ' '.join(sorted_words)"], [0.9222714900970459, "    words_list = s.split(' ')\n    ordered_words_list = [custom_order(word) for word in words_list]\n    ordered_s = ' '.join(ordered_words_list)\n    return ordered_s"], [0.9222686290740967, "    words_list = s.split(' ')\n    ordered_words_list = [custom_order(word) for word in words_list]\n    ordered_s = ' '.join(ordered_words_list)\n    return ordered_s"], [0.9218586683273315, "    words = re.split('(\\\\W+)', s)\n    rearranged_words = [''.join(sorted(word, key=str.lower)) for word in words]\n    return ''.join(rearranged_words)"], [0.9196187257766724, "    words = s.split(' ')\n    intricate_sorted = ''\n    for i in range(len(words)):\n        chars = list(words[i])\n        chars.sort(key=lambda x: (compute_char_freq(words[i])[x], ord(x)))\n        words[i] = ''.join(chars)\n        intricate_sorted += words[i] + ' '\n    return intricate_sorted[:len(intricate_sorted) - 1]"]]}
{"task_id": "HumanEval/87", "problem": [[0.9319692254066467, "    result = []\n    for row_index, row in enumerate(lst):\n        for column_index, element in enumerate(row):\n            if element == x:\n                result.append((row_index, column_index))\n    result.sort(key=lambda a: (a[0], -a[1]))\n    return result"], [0.9151132106781006, "    for row_index, row in enumerate(lst):\n        for column_index, element in enumerate(row):\n            if element == x:\n                result.append((row_index, column_index))"], [0.9072812795639038, "    row_index = None\n    col_index = None\n    for row in range(len(lst)):\n        for col in range(len(lst[row])):\n            if lst[row][col] == item:\n                row_index = row\n                col_index = col\n    if row_index is None and col_index is None:\n        return None\n    else:\n        return (row_index, col_index)"], [0.9071722030639648, "    if is_reversed:\n        matrix = [row[::-1] for row in matrix]\n    coordinates = []\n    for i in range(len(matrix)):\n        for j in range(len(matrix[i])):\n            if matrix[i][j] == x:\n                tuple = [i, j] if not is_reversed else [i, len(matrix[i]) - j - 1]\n                coordinates.append(tuple)\n    coordinates.sort(key=lambda x: (x[0], x[1]))\n    return coordinates"], [0.9048237800598145, "    for row in range(len(lst)):\n        for col in range(len(lst[row])):\n            if lst[row][col] == item:\n                row_index = row\n                col_index = col"], [0.9023923873901367, "    for i, row in enumerate(lst):\n        if value in row:\n            return (i, row.index(value))"], [0.9023923873901367, "    for i, row in enumerate(lst):\n        if value in row:\n            return (i, row.index(value))"], [0.9013012647628784, "        for col in range(len(lst[row])):\n            if lst[row][col] == item:\n                row_index = row\n                col_index = col"], [0.9000331163406372, "    for i in range(len(arr)):\n        for j in range(len(arr[i])):\n            if arr[i][j] == x:\n                return (i, j)"], [0.900023877620697, "    for i in range(len(arr)):\n        for j in range(len(arr[i])):\n            if arr[i][j] == x:\n                return (i, j)"]]}
{"task_id": "HumanEval/88", "problem": [[0.9318153858184814, "    elif (first_element + last_element) % 2 == 0:\n        array.sort(reverse=True)\n    else:\n        array = sorted((i for i in array if i % 2 == 0)) + [i for i in array if i % 2 != 0]"], [0.9314126968383789, "    if not array or len(array) == 1:\n        return array\n    copy = array[:]\n    copy.sort()\n    if (copy[0] + copy[-1]) % 2 == 0:\n        copy.reverse()\n    return copy"], [0.9298883080482483, "    if len(array) < 2:\n        return array\n    first = array[0]\n    penultimate = array[-2]\n    sum_value = first + penultimate\n    is_even_sum = sum_value % 2 == 0\n    is_sum_divisible_by_6 = sum_value % 6 == 0\n    is_sum_divisible_by_4 = sum_value % 4 == 0\n    even_section = []\n    odd_section = []\n    diff_section = []\n    for num in array:\n        is_even = num % 2 == 0\n        if is_even:\n            even_section.append(num)\n        elif is_even_sum:\n            odd_section.append(num)\n        else:\n            diff_section.append(num)\n    if is_sum_divisible_by_6:\n        even_section.sort()\n        odd_section.sort()\n        diff_section.sort()\n    elif is_sum_divisible_by_4:\n        even_section.sort(reverse=True)\n        odd_section.sort(reverse=True)\n        diff_section.sort(reverse=True)\n    else:\n        even_section.sort()\n    return even_section + odd_section + diff_section"], [0.9252099990844727, "    if (first_element + last_element) % 3 == 0:\n        array.sort()\n    elif (first_element + last_element) % 2 == 0:\n        array.sort(reverse=True)\n    else:\n        array = sorted((i for i in array if i % 2 == 0)) + [i for i in array if i % 2 != 0]"], [0.9235507249832153, "    first_element = array[0] if array else 0\n    last_element = array[-1] if array else 0\n    is_first_odd = first_element % 2 == 1\n    is_last_odd = last_element % 2 == 1\n    if is_first_odd and is_last_odd:\n        grouping = 'odd_group'\n    elif not is_first_odd and (not is_last_odd):\n        grouping = 'even_group'\n    else:\n        grouping = 'mixed_group'\n    if (first_element + last_element) % 3 == 0:\n        array.sort()\n    elif (first_element + last_element) % 2 == 0:\n        array.sort(reverse=True)\n    else:\n        array = sorted((i for i in array if i % 2 == 0)) + [i for i in array if i % 2 != 0]\n    return {'even_group': [], 'odd_group': [], 'mixed_group': []}.update({grouping: array})"], [0.920208215713501, "    even_numbers = []\n    for number in numbers:\n        if number % 2 == 0:\n            even_numbers.append(number)\n    if len(even_numbers) == 0:\n        return []\n    even_numbers.sort()\n    sorted_numbers = []\n    for number in even_numbers:\n        sorted_numbers.append(number)\n    odd_numbers = []\n    for number in numbers:\n        if number % 2 != 0:\n            odd_numbers.append(number)\n    odd_numbers.sort(reverse=True)\n    for number in odd_numbers:\n        sorted_numbers.append(number)\n    return sorted_numbers"], [0.9181340932846069, "    even_numbers = []\n    odd_numbers = []\n    for num in numbers:\n        if num % 2 == 0:\n            even_numbers.append(num)\n        else:\n            odd_numbers.append(num)\n    even_numbers.sort()\n    odd_numbers.sort(reverse=True)\n    sorted_list = even_numbers + odd_numbers\n    return sorted_list"], [0.9167149066925049, "    filtered_arr = [num for num in arr if num % 2 != 0]\n    sorted_arr = sorted(filtered_arr, reverse=True)\n    sum_odd_numbers = sum(sorted_arr)\n    return (sorted_arr, sum_odd_numbers)"], [0.9143692851066589, "    odds = []\n    evens = []\n    for num in numbers:\n        if num % 2 == 0:\n            evens.append(num)\n        else:\n            odds.append(num)\n    evens.sort(reverse=True)\n    return odds + evens"], [0.9125405550003052, "    odd_numbers = [num for num in my_list if num % 2 != 0]\n    even_numbers = [num for num in my_list if num % 2 == 0]\n    for i in range(len(odd_numbers) - 1):\n        for j in range(len(odd_numbers) - 1):\n            if odd_numbers[j] > odd_numbers[j + 1]:\n                odd_numbers[j], odd_numbers[j + 1] = (odd_numbers[j + 1], odd_numbers[j])\n    for i in range(len(even_numbers) - 1):\n        for j in range(len(even_numbers) - 1):\n            if even_numbers[j] > even_numbers[j + 1]:\n                even_numbers[j], even_numbers[j + 1] = (even_numbers[j + 1], even_numbers[j])\n    return even_numbers + odd_numbers"]]}
{"task_id": "HumanEval/89", "problem": [[0.9239885807037354, "    encrypted_string = ''\n    for i in range(len(string)):\n        char = string[i]\n        encrypted_string += chr(ord(char) + 2)\n    return encrypted_string"], [0.9213706254959106, "    encrypted_string = ''\n    for char in string:\n        if char.isalpha():\n            upper_case_max = 90\n            lower_case_max = 122\n            ascii_value = ord(char)\n            shifted_asc = ascii_value + shift\n            if shifted_asc > upper_case_max and char.isupper():\n                shifted_asc = 64 + (shifted_asc - upper_case_max)\n            elif shifted_asc > lower_case_max and char.islower():\n                shifted_asc = 96 + (shifted_asc - lower_case_max)\n            encrypted_string += chr(shifted_asc)\n        else:\n            encrypted_string += char\n    return encrypted_string"], [0.9203897714614868, "    cipher = ''\n    for char in string:\n        ascii_val = ord(char)\n        encrypted_val = ascii_val + 2\n        encrypted_char = chr(encrypted_val)\n        cipher += encrypted_char\n    return cipher"], [0.9197925329208374, "    encrypted_string = ''\n    for char in string:\n        if char == ' ':\n            encrypted_string += ' '\n        else:\n            ascii_value = ord(char)\n            shifted_ascii_value = ascii_value + shift\n            if shifted_ascii_value > ord('Z'):\n                shifted_ascii_value -= 26\n            encrypted_string += chr(shifted_ascii_value)\n    return encrypted_string"], [0.9183432459831238, "    rotated_text = ''\n    for letter in text:\n        char_code = ord(letter)\n        char_code += 2\n        if char_code > ord('z'):\n            char_code -= 26\n        rotated_text += chr(char_code)\n    return rotated_text"], [0.9173702001571655, "    for letter in text:\n        char_code = ord(letter)\n        char_code += 2\n        if char_code > ord('z'):\n            char_code -= 26\n        rotated_text += chr(char_code)"], [0.9171622395515442, "    for char in string:\n        if char.isalpha():\n            upper_case_max = 90\n            lower_case_max = 122\n            ascii_value = ord(char)\n            shifted_asc = ascii_value + shift\n            if shifted_asc > upper_case_max and char.isupper():\n                shifted_asc = 64 + (shifted_asc - upper_case_max)\n            elif shifted_asc > lower_case_max and char.islower():\n                shifted_asc = 96 + (shifted_asc - lower_case_max)\n            encrypted_string += chr(shifted_asc)\n        else:\n            encrypted_string += char"], [0.9171584844589233, "    encrypted = ''\n    for char in string:\n        if char.isalpha():\n            ascii_offset = 65 if char.isupper() else 97\n            encrypted += chr((ord(char) - ascii_offset + shift) % 26 + ascii_offset)\n        else:\n            encrypted += char\n    return encrypted"]]}
{"task_id": "HumanEval/90", "problem": [[0.9512578248977661, "    if len(lst) < 2:\n        return None\n    smallest = float('inf')\n    next_smallest = float('inf')\n    for i in range(0, len(lst)):\n        if lst[i] < smallest:\n            next_smallest = smallest\n            smallest = lst[i]\n        elif lst[i] > smallest and lst[i] < next_smallest:\n            next_smallest = lst[i]\n    return None if next_smallest == float('inf') else next_smallest"], [0.9447739720344543, "    if not lst or len(lst) < 2:\n        return None\n    smallest = second_smallest = float('inf')\n    for element in lst:\n        if element < smallest:\n            second_smallest = smallest\n            smallest = element\n        elif smallest < element < second_smallest:\n            second_smallest = element\n    return None if second_smallest == float('inf') else second_smallest"], [0.9356889724731445, "    if len(lst) < 2:\n        return None\n    first_min = second_min = float('inf')\n    for num in lst:\n        if num < first_min:\n            second_min = first_min\n            first_min = num\n        elif num < second_min and num != first_min:\n            second_min = num\n    if second_min == float('inf'):\n        return None\n    return second_min"], [0.9331862330436707, "    if len(arr) < 2:\n        return None\n    smallest = float('inf')\n    second_smallest = float('inf')\n    for num in arr:\n        if num < smallest:\n            second_smallest = smallest\n            smallest = num\n        elif num < second_smallest and num != smallest:\n            second_smallest = num\n    return second_smallest if second_smallest != float('inf') else None"], [0.9324913620948792, "    if len(lst) < 2:\n        return None\n    lst.sort()\n    smallest = lst[0]\n    for el in lst:\n        if el > smallest:\n            return el\n    return None"], [0.9307579398155212, "    if len(my_list) < 2:\n        return None\n    smallest = float('inf')\n    second_smallest = float('inf')\n    for num in my_list:\n        if num < smallest:\n            second_smallest = smallest\n            smallest = num\n        elif num < second_smallest and num != smallest:\n            second_smallest = num\n    if second_smallest == float('inf'):\n        return None\n    return second_smallest"], [0.928528904914856, "    if len(lst) < 2:\n        return None\n    largest = float('-inf')\n    second_largest = float('-inf')\n    for num in lst:\n        if num > largest:\n            second_largest = largest\n            largest = num\n        elif num > second_largest and num < largest:\n            second_largest = num\n    return second_largest"], [0.9276971817016602, "    if len(lst) < 2:\n        return None\n    largest = float('-inf')\n    second_largest = float('-inf')\n    for num in lst:\n        if num > largest:\n            second_largest = largest\n            largest = num\n        elif num > second_largest and num != largest:\n            second_largest = num\n    return second_largest"], [0.9274832606315613, "    if len(lst) < 2:\n        return None\n    max_val = second_max = float('-inf')\n    unique_elements = set(lst)\n    if len(unique_elements) < 2:\n        return None\n    for num in unique_elements:\n        if num > max_val:\n            second_max = max_val\n            max_val = num\n        elif num > second_max:\n            second_max = num\n    return second_max"], [0.9230998158454895, "    max_num = second_max = float('-inf')\n    for num in lst:\n        if num > max_num:\n            second_max, max_num = (max_num, num)\n        elif max_num > num > second_max:\n            second_max = num\n    if second_max == float('-inf'):\n        return None\n    return second_max"]]}
{"task_id": "HumanEval/91", "problem": [[0.9441654682159424, "    sentences = [sentence.strip() for sentence in re.split('[.!?]', S) if sentence.strip()]\n    boring_count = 0\n    exciting_count = 0\n    for sentence in sentences:\n        if sentence.startswith('I'):\n            boring_count += 1\n        if sentence.endswith('!'):\n            exciting_count += 1\n    return (boring_count, exciting_count)"], [0.9334797859191895, "    boring_sent_count = 0\n    exciting_sent_count = 0\n    sentences = re.split('\\\\.|\\\\?|\\\\!', S)\n    for sentence in sentences:\n        sentence = sentence.strip()\n        if sentence.startswith('I'):\n            boring_sent_count += 1\n        if sentence.endswith('!'):\n            exciting_sent_count += 1\n    return (boring_sent_count, exciting_sent_count)"], [0.9314954876899719, "    sentences = [s.strip() for s in S.replace('!', '!. ').replace('.', '. ').replace('?', '? ').split() if s]\n    mundane_count = sum((s.startswith('I') for s in sentences))\n    enthusiastic_count = sum((s.endswith('!') for s in sentences))\n    return (mundane_count, enthusiastic_count)"], [0.9140270352363586, "    sentences = [sentence.strip() for sentence in re.split('[.!?]', S) if sentence]\n    dull_count = len([sentence for sentence in sentences if sentence.startswith('He')])\n    excited_count = len([sentence for sentence in sentences if sentence.endswith('?')])\n    return (dull_count, excited_count)"], [0.9137551784515381, "    for sentence in sentences:\n        sentence = sentence.strip()\n        if sentence.startswith('I'):\n            boring_sent_count += 1\n        if sentence.endswith('!'):\n            exciting_sent_count += 1"], [0.9127048254013062, "    for sentence in sentences:\n        if sentence.startswith('I'):\n            boring_count += 1\n        if sentence.endswith('!'):\n            exciting_count += 1"], [0.9090558290481567, "        if sentence.startswith('I'):\n            boring_count += 1"], [0.9035824537277222, "        if sentence.startswith('I'):\n            boring_sent_count += 1"], [0.8916347026824951, "    count = 0\n    sentence = sentence.lower()\n    word = word.lower()\n    for i in range(len(sentence)):\n        if sentence[i] == ' ' or sentence[i] in ['.', ',', '?', '!', ';', ':']:\n            if sentence[i - len(word):i] == word:\n                count += 1\n    if sentence[len(sentence) - len(word):] == word:\n        count += 1\n    return count"], [0.8905940055847168, "    count = 0\n    for i in range(len(sentence)):\n        if sentence[i] == ' ':\n            count += 1\n    count += 1\n    return count"]]}
{"task_id": "HumanEval/92", "problem": [[0.913934051990509, "    sum = x + y + z\n    if sum % 2 == 0:\n        return True\n    else:\n        return False"], [0.9138966202735901, "    sum = x + y + z\n    if sum % 2 == 0:\n        return True\n    else:\n        return False"], [0.9096477627754211, "    if x == y and y == z:\n        return True\n    else:\n        return False"], [0.9096477627754211, "    if x == y and y == z:\n        return True\n    else:\n        return False"], [0.9059178829193115, "    if isinstance(x, (int, complex)) and isinstance(y, (int, complex)) and isinstance(z, (int, complex)):\n        if x ** 2 + y ** 2 == z ** 2:\n            return True\n        else:\n            raise ValueError('Provided values cannot satisfy the equation: x^2 + y^2 = z^2')\n    else:\n        raise TypeError('Inputs must be integers or complex numbers')"], [0.9059178829193115, "    if isinstance(x, (int, complex)) and isinstance(y, (int, complex)) and isinstance(z, (int, complex)):\n        if x ** 2 + y ** 2 == z ** 2:\n            return True\n        else:\n            raise ValueError('Provided values cannot satisfy the equation: x^2 + y^2 = z^2')\n    else:\n        raise TypeError('Inputs must be integers or complex numbers')"], [0.9043641090393066, "    if x + y > z and x + z > y and (y + z > x):\n        return True\n    else:\n        return False"], [0.9043641090393066, "    if x + y > z and x + z > y and (y + z > x):\n        return True\n    else:\n        return False"], [0.9022274017333984, "        if -100 <= a <= 100 and -100 <= b <= 100 and (-100 <= c <= 100):\n            return a + b + c\n        elif isinstance(a, int):\n            return 'Numbers are not within the range of -100 to 100.'\n        else:\n            return 'Numbers are not within the range of -100.0 to 100.0.'"], [0.9020248651504517, "    if not type(x) == type(y) == type(z) == int:\n        return 'Error: Inputs must be integers.'"]]}
{"task_id": "HumanEval/93", "problem": [[0.9262090921401978, "    vowels = 'aeiou'\n    consonants = 'bcdfghjklmnpqrstvwxyz'\n    all_chars = string.ascii_lowercase + string.ascii_uppercase\n    vowels_shifted = deque(vowels)\n    vowels_shifted.rotate(-shift)\n    con_shifted = deque(consonants)\n    con_shifted.rotate(-shift)\n    trans_lowercase = str.maketrans(vowels + consonants, ''.join(vowels_shifted + con_shifted))\n    trans_uppercase = str.maketrans(vowels.upper() + consonants.upper(), ''.join(vowels_shifted + con_shifted).upper())\n    trans = {**trans_lowercase, **trans_uppercase}\n    swapped_message = message.swapcase()\n    shifted_message = swapped_message.translate(trans)\n    encrypted_message = ''\n    for i, char in enumerate(shifted_message):\n        if char not in string.ascii_letters:\n            encrypted_message += char\n            continue\n        encrypted_message += all_chars[(all_chars.index(char) + i * shift * ord(char)) % len(all_chars)]\n    return encrypted_message"], [0.9236932992935181, "    for i in range(len(message)):\n        if message[i] == ' ':\n            encoded_message += ' '\n        elif message[i].lower() not in vowels:\n            if message[i].islower():\n                encoded_message += alphabet[(alphabet.index(message[i]) + shift) % 26]\n            else:\n                encoded_message += alphabet[(alphabet.index(message[i].lower()) + shift) % 26].upper()\n        elif message[i].islower():\n            encoded_message += alphabet[(alphabet.index(message[i]) - shift) % 26]\n        else:\n            encoded_message += alphabet[(alphabet.index(message[i].lower()) - shift) % 26].upper()"], [0.9213772416114807, "    vowels = 'aeiou'\n    alphabet = 'abcdefghijklmnopqrstuvwxyz'\n    encoded_message = ''\n    for i in range(len(message)):\n        if message[i] == ' ':\n            encoded_message += ' '\n        elif message[i].lower() not in vowels:\n            if message[i].islower():\n                encoded_message += alphabet[(alphabet.index(message[i]) + shift) % 26]\n            else:\n                encoded_message += alphabet[(alphabet.index(message[i].lower()) + shift) % 26].upper()\n        elif message[i].islower():\n            encoded_message += alphabet[(alphabet.index(message[i]) - shift) % 26]\n        else:\n            encoded_message += alphabet[(alphabet.index(message[i].lower()) - shift) % 26].upper()\n    new_message = ''\n    for i in range(len(encoded_message)):\n        if encoded_message[i] != ' ':\n            new_index = (i + 1) * shift * ord(encoded_message[i])\n            while new_index > len(encoded_message) - 1:\n                new_index -= len(encoded_message)\n            new_message += str(new_index) + encoded_message[i]\n        else:\n            new_message += ' '\n    return new_message"], [0.9210046529769897, "    char_map = {chr(i): chr(i + 10) for i in range(97, 123)}\n    encoded_msg = ''\n    for char in message:\n        if char in char_map:\n            encoded_msg += char_map[char]\n        else:\n            encoded_msg += char\n    return encoded_msg"], [0.9205999374389648, "        elif message[i].lower() not in vowels:\n            if message[i].islower():\n                encoded_message += alphabet[(alphabet.index(message[i]) + shift) % 26]\n            else:\n                encoded_message += alphabet[(alphabet.index(message[i].lower()) + shift) % 26].upper()\n        elif message[i].islower():\n            encoded_message += alphabet[(alphabet.index(message[i]) - shift) % 26]\n        else:\n            encoded_message += alphabet[(alphabet.index(message[i].lower()) - shift) % 26].upper()"], [0.919834315776825, "        if message[i] == ' ':\n            encoded_message += ' '\n        elif message[i].lower() not in vowels:\n            if message[i].islower():\n                encoded_message += alphabet[(alphabet.index(message[i]) + shift) % 26]\n            else:\n                encoded_message += alphabet[(alphabet.index(message[i].lower()) + shift) % 26].upper()\n        elif message[i].islower():\n            encoded_message += alphabet[(alphabet.index(message[i]) - shift) % 26]\n        else:\n            encoded_message += alphabet[(alphabet.index(message[i].lower()) - shift) % 26].upper()"], [0.9170151352882385, "    vowels = ('a', 'e', 'i', 'o', 'u')\n    encrypted_word = ''\n    for ch in word:\n        if ch in vowels:\n            if ch == 'u':\n                encrypted_word += 'a'\n            else:\n                encrypted_word += chr(ord(ch) + 1)\n        else:\n            encrypted_word += ch\n    return encrypted_word"], [0.9167841672897339, "    encoded = ''\n    for ch in message:\n        if ch.isalpha():\n            if ch.isupper():\n                encoded += chr((ord(ch) - 65 + 13) % 26 + 65)\n            else:\n                encoded += chr((ord(ch) - 97 + 13) % 26 + 97)\n        else:\n            encoded += ch\n    return encoded"], [0.916702926158905, "    consonants = 'bcdfghjklmnpqrstvwxyz'\n    encoded_s = ''\n    for char in s:\n        if char.lower() in consonants:\n            encoded_s += consonants[(consonants.index(char.lower()) + 1) % len(consonants)]\n        else:\n            encoded_s += char\n    return encoded_s"], [0.9162760376930237, "    encrypted_message = ''\n    for c in message:\n        if c.isalpha():\n            if c >= 'a' and c <= 'z':\n                encrypted_message += chr(219 - ord(c))\n            else:\n                encrypted_message += chr(155 - ord(c))\n        else:\n            encrypted_message += c\n    return encrypted_message"]]}
{"task_id": "HumanEval/94", "problem": [[0.9467540979385376, "    max_prime = 0\n    for i in lst:\n        if is_prime(i) and i > max_prime:\n            max_prime = i\n    return sum_digits(max_prime)"], [0.9381372928619385, "    return max((sum_of_digits(i) for i in lst if is_prime(i)))"], [0.9381181001663208, "    return max((sum_of_digits(i) for i in lst if is_prime(i)))"], [0.9316754937171936, "    lst.sort()\n    primes = []\n    for i in lst:\n        if i > 10 and is_prime(i, primes):\n            primes.append(i)\n    return sum(primes)"], [0.9307544231414795, "    largest_prime = None\n    for num in lst:\n        if largest_prime is None or num > largest_prime:\n            if is_prime(num):\n                largest_prime = num\n    return largest_prime"], [0.9302141666412354, "    prime_numbers = []\n    for num in lst:\n        if is_prime(num):\n            prime_numbers.append(num)\n        else:\n            return 'Error: List contains non-prime numbers.'\n    if not prime_numbers:\n        return 'Error: List is empty.'\n    else:\n        return max(prime_numbers)"], [0.9295162558555603, "    prime_numbers = []\n    for num in lst:\n        if is_prime(num):\n            prime_numbers.append(num)\n            if len(prime_numbers) == 3:\n                break\n    return sum(prime_numbers)"], [0.929330587387085, "    for i in lst:\n        if isprime(i):\n            digit_sum = digitSum(i)\n            if isprime(digit_sum) and i > maxPrime:\n                maxPrime = i\n                sumDigits = digit_sum"], [0.9293210506439209, "    for i in lst:\n        if isprime(i):\n            digit_sum = digitSum(i)\n            if isprime(digit_sum) and i > maxPrime:\n                maxPrime = i\n                sumDigits = digit_sum"], [0.9287527799606323, "    lst.sort(reverse=True)\n    result = 0\n    for num in lst:\n        if num % 2 == 0 and (not is_prime(num)) and (not num % 3 == 0) and (not num % 5 == 0) and has_prime_number_of_digits(num):\n            result += num\n    return result"]]}
{"task_id": "HumanEval/95", "problem": [[0.9316221475601196, "    if not d:\n        return False\n    lower = 0\n    upper = 0\n    for key in d:\n        if key.islower():\n            lower += 1\n        elif key.isupper():\n            upper += 1\n        else:\n            return False\n    if lower == len(d) or upper == len(d):\n        return True\n    else:\n        return False"], [0.9312478303909302, "    if not bool(dict):\n        return False\n    keys = dict.keys()\n    is_lower = all((key == key.lower() for key in keys))\n    is_upper = all((key == key.upper() for key in keys))\n    if is_lower or is_upper:\n        return True\n    return False"], [0.9219108819961548, "    upper_case = 0\n    lower_case = 0\n    for key in dct:\n        if key.isupper():\n            upper_case += 1\n        elif key.islower():\n            lower_case += 1\n        else:\n            return False\n    return upper_case == len(dct) or lower_case == len(dct)"], [0.9209568500518799, "    if not dct:\n        return False\n    lower_case = sum([k.islower() for k in dct.keys()])\n    upper_case = sum([k.isupper() for k in dct.keys()])\n    is_alpha = sum([k.isalpha() for k in dct.keys()])\n    return is_alpha == len(dct) and (lower_case == len(dct) or upper_case == len(dct))"], [0.9189454317092896, "    for key in dct:\n        if key.isupper():\n            upper_case += 1\n        elif key.islower():\n            lower_case += 1\n        else:\n            return False"], [0.918137788772583, "    if not dct:\n        return False\n    lower_case = sum([k.islower() for k in dct.keys()])\n    upper_case = sum([k.isupper() for k in dct.keys()])\n    return lower_case == len(dct) or upper_case == len(dct)"], [0.9181094169616699, "    if not dct:\n        return False\n    lower_case = sum([k.islower() for k in dct.keys()])\n    upper_case = sum([k.isupper() for k in dct.keys()])\n    return lower_case == len(dct) or upper_case == len(dct)"], [0.9175105094909668, "    if len(dct) == 0:\n        return False\n    lower_case = sum((k.islower() for k in dct.keys()))\n    upper_case = sum((k.isupper() for k in dct.keys()))\n    mix_case = any((not k.isupper() and (not k.islower()) for k in dct.keys()))\n    return not (lower_case == len(dct) or upper_case == len(dct) or mix_case)"], [0.9155030250549316, "    for key in d:\n        if key.islower():\n            lower += 1\n        elif key.isupper():\n            upper += 1\n        else:\n            return False"], [0.9098288416862488, "    if not isinstance(input_dict, dict):\n        raise TypeError('The argument must be a dictionary.')\n    elif not input_dict:\n        return 'The dictionary is empty.'\n    else:\n        return 'The dictionary is not empty.'"]]}
{"task_id": "HumanEval/96", "problem": [[0.9374005794525146, "    if not isinstance(n, int) or n < 0:\n        return 'Error: n must be a non-negative integer'\n    primes = []\n    i = 0\n    while i <= n:\n        if is_prime(i):\n            primes.append(i)\n        i += 1\n    return primes"], [0.9329354763031006, "    if n < 2:\n        return []\n    primes = []\n    for possible_prime in range(2, n):\n        is_prime = True\n        for num in range(2, possible_prime):\n            if possible_prime % num == 0:\n                is_prime = False\n        if is_prime:\n            primes.append(possible_prime)\n    return primes"], [0.9323546290397644, "    if n <= 0:\n        return []\n    primes = []\n    num = 2\n    while len(primes) < n:\n        if is_prime(num):\n            primes.append(num)\n        num += 1\n    return primes"], [0.9322728514671326, "    if n <= 0:\n        raise ValueError('The provided number should be a positive integer')\n    return [x for x in range(2, n) if is_prime(x)]"], [0.9319793581962585, "    try:\n        n = int(n)\n        assert n >= 0\n    except ValueError:\n        return 'Error: The input must be an integer.'\n    except AssertionError:\n        return 'Error: The input must be a non-negative integer.'\n    primes = [True for _ in range(n + 1)]\n    p = 2\n    while p ** 2 <= n:\n        if primes[p] is True:\n            for i in range(p ** 2, n + 1, p):\n                primes[i] = False\n        p += 1\n    prime_numbers = [p for p in range(2, n) if primes[p]]\n    return prime_numbers"], [0.9318251013755798, "    count = 0\n    num = 0\n    primes = []\n    while count < n:\n        if is_prime(num):\n            primes.append(num)\n            count += 1\n        num += 1\n    return primes"], [0.9318135976791382, "    if not isinstance(n, int) or n <= 0:\n        return 'Error: The input must be a positive integer'\n    primes = [True] * (n + 1)\n    primes[0] = primes[1] = False\n    p = 2\n    while p * p <= n:\n        if primes[p] == True:\n            for i in range(p * p, n + 1, p):\n                primes[i] = False\n        p += 1\n    return [p for p in range(2, n + 1) if primes[p]]"], [0.9313969612121582, "    num = 2\n    count = 0\n    prime_numbers = []\n    while count < limit:\n        if is_prime(num):\n            prime_numbers.append(num)\n            count += 1\n        num += 1\n    return prime_numbers"], [0.9309356212615967, "    if type(n) != int or n <= 0:\n        raise ValueError('n must be a positive integer greater than zero')\n    primes = []\n    num = 2\n    while len(primes) < n:\n        if is_prime(num):\n            primes.append(num)\n        num += 1\n    return primes"], [0.9307852983474731, "    if n <= 1:\n        return []\n    prime_numbers = []\n    for i in range(2, n + 1):\n        is_prime = True\n        for j in range(2, i):\n            if i % j == 0:\n                is_prime = False\n        if is_prime:\n            prime_numbers.append(i)\n    return prime_numbers"]]}
{"task_id": "HumanEval/97", "problem": [[0.931093692779541, "    last_digit_a = abs(a) % 10\n    last_digit_b = abs(b) % 10\n    return last_digit_a * last_digit_b"], [0.9117335677146912, "    unit_digit1 = num1 % 10\n    unit_digit2 = num2 % 10\n    return unit_digit1 * unit_digit2"], [0.9036250114440918, "    product = 1\n    a_str = str(a)\n    b_str = str(b)\n    for digit in a_str:\n        product *= int(digit)\n    for digit in b_str:\n        product *= int(digit)\n    return product"], [0.9034533500671387, "    a = str(a)\n    b = str(b)\n    last_two_a = int(a[-2:])\n    last_two_b = int(b[-2:])\n    return last_two_a + last_two_b"], [0.8969472646713257, "    if not isinstance(n, int):\n        raise ValueError('Input must be an integer.')\n    if n < 0:\n        n = -n\n    least_digit = n % 10\n    print('The least significant digit of', n, 'is', least_digit)\n    return least_digit"], [0.8923767805099487, "    return last_ten_digits(a * b)"], [0.8923529386520386, "    a = abs(a)\n    b = abs(b)\n    if a == 0 or b == 0:\n        return 'Error: Zero is not allowed as an input'\n    greater = max(a, b)\n    smaller = min(a, b)\n    remainder = greater % smaller\n    return remainder"], [0.8912255764007568, "    a = abs(a)\n    b = abs(b)\n    sign = -1 if (a < 0) ^ (b < 0) else 1\n    a = int(a)\n    b = int(b)\n    product = 0\n    while b > 0:\n        product += a\n        b -= 1\n    product = float(product)\n    product *= sign\n    return product"], [0.8877585530281067, "    elif num1 < 0 or num2 < 0:\n        product = -abs(num1) * abs(num2)\n    else:\n        product = num1 * num2"], [0.886858344078064, "    x = max(min(x, 1000), 1)\n    return x % 10"]]}
{"task_id": "HumanEval/98", "problem": [[0.9478957653045654, "    assert 1 <= len(s) <= 1000, 'Invalid string length. It should be between 1 and 1000 characters'\n    vowels = set('AEIOU')\n    count = sum((1 for i in range(0, len(s)) if s[i].isupper() and s[i] in vowels and (i % 2 == 0)))\n    return count"], [0.9457566738128662, "    upper_vowels = ['A', 'E', 'I', 'O', 'U']\n    count = sum((1 for i in range(len(s)) if i % 2 == 0 and s[i] in upper_vowels))\n    return count"], [0.9451885223388672, "    upper_vowels = 'AEIOU'\n    even_letters = s[::2]\n    counter = sum((1 for letter in even_letters if letter in upper_vowels))\n    return counter"], [0.944034993648529, "    upper_vowels = 'AEIOU'\n    return sum((1 for i in range(len(s)) if i % 2 == 0 and s[i] in upper_vowels))"], [0.9440107345581055, "    upper_vowels = 'AEIOU'\n    return sum((1 for i in range(len(s)) if i % 2 == 0 and s[i] in upper_vowels))"], [0.9327834844589233, "    return sum((1 for i, c in enumerate(s) if c.isupper() and c in 'AEIOU' and (i % 2 == 0)))"], [0.9325428009033203, "    assert 1 <= len(s) <= 1000, 'String length should be between 1 and 1000 characters'\n    vow = ['A', 'E', 'I', 'O', 'U']\n    count = sum((1 for i in range(len(s)) if i % 2 == 0 and s[i] in vow))\n    return count"], [0.9292922019958496, "    upper_vowels = 'AEIOU'\n    lower_vowels = 'aeiou'\n    odd_upper, even_lower = (0, 0)\n    for i in range(len(s)):\n        if i % 2 == 0:\n            if s[i] in lower_vowels:\n                even_lower += 1\n        elif s[i] in upper_vowels:\n            odd_upper += 1\n    return (odd_upper, even_lower)"], [0.9276909828186035, "    try:\n        assert isinstance(s, str), 'Invalid input'\n        vowel_list = ['A', 'E', 'I', 'O', 'U']\n        return sum([1 for i in range(len(s)) if s[i] in vowel_list and i % 2 == 0])\n    except:\n        return 'Invalid input'"], [0.9276909828186035, "    try:\n        assert isinstance(s, str), 'Invalid input'\n        vowel_list = ['A', 'E', 'I', 'O', 'U']\n        return sum([1 for i in range(len(s)) if s[i] in vowel_list and i % 2 == 0])\n    except:\n        return 'Invalid input'"]]}
{"task_id": "HumanEval/99", "problem": [[0.9153082370758057, "    try:\n        num = float(value)\n    except ValueError:\n        return 'Error: Invalid input.'\n    if num < low or num > high:\n        return 'Error: Out of range.'\n    int_part = int(num)\n    decimal_part = abs(num - int_part)\n    if decimal_part < 0.5:\n        return int_part\n    elif num >= 0:\n        return int_part + 1\n    else:\n        return int_part - 1"], [0.910211443901062, "    try:\n        num_value = Decimal(value)\n    except InvalidOperation:\n        return 'Error: Invalid input.'\n    if not low <= num_value <= high:\n        return 'Error: Beyond range.'\n    decimal, integer = divmod(num_value, 1)\n    if decimal <= Decimal('0.5'):\n        return int(integer + 1)\n    elif decimal <= Decimal('-0.5'):\n        return int(integer - 1)\n    else:\n        return int(integer)"], [0.9094333052635193, "    try:\n        num_value = Decimal(value)\n    except InvalidOperation:\n        return 'Error: Invalid input.'\n    if not low <= num_value <= high:\n        return 'Error: Beyond range.'\n    decimal, integer = divmod(num_value, 1)\n    if decimal >= Decimal('0.5'):\n        return int(integer + 1)\n    elif decimal <= Decimal('-0.5'):\n        return int(integer - 1)\n    else:\n        return int(integer)"], [0.9087764024734497, "    try:\n        value = float(value)\n    except ValueError:\n        return 'Error: Invalid input.'\n    if not low <= value <= high:\n        return 'Error: Out of range.'\n    decimal = value - int(value)\n    if decimal >= 0.5 and value >= 0:\n        value += 1\n    elif decimal <= -0.5 and value <= 0:\n        value -= 1\n    return int(value)"], [0.9064860343933105, "    try:\n        num = float(value)\n        rounded = int(num)\n        if num - int(num) >= 0.5:\n            if num < 0:\n                rounded += 1\n            else:\n                rounded -= 1\n        if not is_prime(rounded):\n            rounded = closest_prime(rounded)\n        return rounded\n    except ValueError:\n        return 'Error: Invalid input.'"], [0.9064860343933105, "    try:\n        num = float(value)\n        rounded = int(num)\n        if num - int(num) >= 0.5:\n            if num < 0:\n                rounded += 1\n            else:\n                rounded -= 1\n        if not is_prime(rounded):\n            rounded = closest_prime(rounded)\n        return rounded\n    except ValueError:\n        return 'Error: Invalid input.'"], [0.9062358140945435, "    try:\n        float_digit = float(digit)\n    except ValueError:\n        return 'Error: Invalid input.'\n    if not lower_bound <= float_digit <= upper_bound:\n        return 'Error: Out of range.'\n    integ, frac = divmod(float_digit, 1)\n    if frac >= 0.5:\n        if float_digit > 0:\n            rounded_value = integ\n        else:\n            rounded_value = integ - 1\n    else:\n        rounded_value = integ\n    return int(rounded_value)"], [0.906152606010437, "    try:\n        num = float(decimal_in_str_format)\n    except ValueError:\n        return 'Error: Invalid input.'\n    if num < lower_bound or num > upper_bound:\n        return 'Error: Beyond range.'\n    if num >= 0:\n        decimal = num - int(num)\n        if decimal < 0.5:\n            return int(num)\n        else:\n            return int(num) + 1\n    else:\n        decimal = -num + int(-num)\n        if decimal < 0.5:\n            return int(num)\n        else:\n            return int(num) - 1"], [0.9055969715118408, "    try:\n        value = float(value)\n        if value < low or value > high:\n            return 'Error: Out of range.'\n        elif value >= 0:\n            return int(value) if value - int(value) < 0.5 else int(value) + 1\n        else:\n            return int(value) if abs(value - int(value)) < 0.5 else int(value) - 1\n    except ValueError:\n        return 'Error: Invalid input.'"], [0.9055969715118408, "    try:\n        value = float(value)\n        if value < low or value > high:\n            return 'Error: Out of range.'\n        elif value >= 0:\n            return int(value) if value - int(value) < 0.5 else int(value) + 1\n        else:\n            return int(value) if abs(value - int(value)) < 0.5 else int(value) - 1\n    except ValueError:\n        return 'Error: Invalid input.'"]]}
{"task_id": "HumanEval/100", "problem": [[0.8978773951530457, "    stones = [n]\n    for i in range(1, n):\n        if pattern == 'odd':\n            stones.append(stones[-1] + 2 * i + 1)\n        elif pattern == 'even':\n            stones.append(stones[-1] + 2 * i + offset)\n    return stones"], [0.8962353467941284, "    stones = [n]\n    for i in range(1, n):\n        if pattern == 'odd':\n            stones.append(n + 2 * i + offset)\n        elif pattern == 'even':\n            stones.append(n + 2 * i - 1 + offset)\n    return stones"], [0.894518256187439, "    stones = [n + offset]\n    for i in range(1, n):\n        if pattern == 'odd':\n            stones.append(stones[-1] + 2 * i - 1)\n        elif pattern == 'even':\n            stones.append(stones[-1] + 2 * i)\n    return stones"], [0.8944116234779358, "    for n in range(1, len(a)):\n        a[n] = a[n - 1] + 2\n    return a"], [0.893936812877655, "    for i in range(1, n):\n        if pattern == 'odd':\n            stones.append(stones[-1] + 2 * i - 1)\n        elif pattern == 'even':\n            stones.append(stones[-1] + 2 * i)"], [0.8938546776771545, "    stones = [n + 2 * i for i in range(n)]\n    return stones"], [0.892432451248169, "    if n == 1:\n        return 1\n    elif n % 2 == 0:\n        return sum_of_odd_numbers(n - 1)\n    else:\n        return n + sum_of_odd_numbers(n - 2)"], [0.892432451248169, "    if n == 1:\n        return 1\n    elif n % 2 == 0:\n        return sum_of_odd_numbers(n - 1)\n    else:\n        return n + sum_of_odd_numbers(n - 2)"], [0.8922889232635498, "    for i in range(1, n):\n        if pattern == 'odd':\n            stones.append(stones[-1] + 2 * i + 1)\n        elif pattern == 'even':\n            stones.append(stones[-1] + 2 * i + offset)"], [0.8917273283004761, "    elif n % 2 == 0:\n        return sum_of_odd_numbers(n - 1)\n    else:\n        return n + sum_of_odd_numbers(n - 2)"]]}
{"task_id": "HumanEval/101", "problem": [[0.9103398323059082, "    words = s.split(' ')\n    return words"], [0.9103398323059082, "    words = s.split(' ')\n    return words"], [0.9097162485122681, "    words = []\n    word = ''\n    for i in range(len(string)):\n        if string[i] == ' ':\n            words.append(word)\n            word = ''\n        else:\n            word += string[i]\n    if word != '':\n        words.append(word)\n    return words"], [0.909195601940155, "    words = []\n    word = ''\n    for c in s:\n        if c.isspace():\n            if word:\n                words.append(word)\n            word = ''\n        else:\n            word += c\n    if word:\n        words.append(word)\n    return words"], [0.9089457988739014, "    word = ''\n    list_of_words = []\n    for char in string:\n        if char == ' ':\n            list_of_words.append(word)\n            word = ''\n        else:\n            word += char\n    list_of_words.append(word)\n    return list_of_words"], [0.9070054292678833, "    words = []\n    word = ''\n    for char in string:\n        if char != ' ':\n            word += char\n        elif word != '':\n            words.append(word)\n            word = ''\n    if word != '':\n        words.append(word)\n    return words"], [0.9063661098480225, "    words = string.split(' ')\n    return words"], [0.9063631296157837, "    words = string.split(' ')\n    return words"], [0.9063519835472107, "    words = string.split(' ')\n    return words"], [0.9063441157341003, "    words = string.split(' ')\n    return words"]]}
{"task_id": "HumanEval/102", "problem": [[0.9298559427261353, "    maxEvenNumber = -1\n    if y >= x:\n        for i in range(x, y + 1):\n            if i % 2 == 0:\n                maxEvenNumber = i\n    return maxEvenNumber"], [0.9169257283210754, "    if y >= x:\n        for i in range(x, y + 1):\n            if i % 2 == 0:\n                maxEvenNumber = i"], [0.9104064106941223, "    for i in range(y, x - 1, -1):\n        if i % z == 0 and i % 2 == 0:\n            return i\n    return -1"], [0.9103742241859436, "    for i in range(y, x - 1, -1):\n        if i % z == 0 and i % 2 == 0:\n            return i\n    return -1"], [0.9093164801597595, "        for i in range(x, y + 1):\n            if i % 2 == 0:\n                maxEvenNumber = i"], [0.9079453945159912, "    if not type(x) == type(y) == type(z) == int:\n        return 'Error: Inputs must be integers.'\n    if not (x >= 0 and y >= 0 and (z >= 0)):\n        return 'Error: Inputs must be positive.'\n    if x > y:\n        return 'Error: x should be less than or equal to y.'\n    largest_num = None\n    for i in range(y, x - 1, -1):\n        if i % z == 0 and i % 2 == 0:\n            largest_num = i\n            break\n    return largest_num"], [0.9065008163452148, "    for i in range(y, x - 1, -1):\n        if i % z == 0 and i % 2 == 0:\n            return i"], [0.9064511656761169, "    for i in range(y, x - 1, -1):\n        if i % z == 0 and i % 2 == 0:\n            return i"], [0.9064016938209534, "    for num in range(y, x - 1, -1):\n        if num % 2 == 0 and num % z == 0:\n            return num\n    return -1"], [0.9044733047485352, "    highest_even = y if y % 2 == 0 else y - 1\n    for i in range(highest_even, x - 1, -2):\n        if i % z == 0:\n            return i\n    return -1"]]}
{"task_id": "HumanEval/103", "problem": [[0.9289141893386841, "    if not 1 <= n <= m or not 2 <= base <= 10:\n        return -1\n    total, count = (0, 0)\n    for i in range(n, m + 1):\n        total += i\n        count += 1\n    avg = round(total / count)\n    if base == 2:\n        return bin(avg)\n    elif base == 8:\n        return oct(avg)\n    elif base == 10:\n        return str(avg)\n    else:\n        return to_base_x(avg, base)"], [0.9216184020042419, "    if m < n or base < 2 or base > 10:\n        return -1\n    avg = math.ceil(sum(range(n, m + 1)) / (m - n + 1))\n    if base == 2:\n        return bin(avg)\n    elif base == 8:\n        return oct(avg)\n    elif base == 10:\n        return str(avg)\n    else:\n        return manual_base_conversion(avg, base)"], [0.9134619235992432, "    if n > m or base < 2 or base > 10:\n        return -1\n    tot_sum, weight = (0, 0)\n    for i in range(n, m + 1):\n        divs = [1, i] + [j for j in range(2, int(i ** 0.5) + 1) if i % j == 0]\n        divs_for_calc = divs + [i / j for j in divs if j * j != i]\n        div_count = len(divs_for_calc)\n        tot_sum += i * div_count\n        weight += div_count\n    weighted_avg = round(tot_sum / weight)\n    total_sequence = (weighted_avg * 2 + weight - 1) * weight // 2\n    if base == 2:\n        return bin(total_sequence)\n    elif base == 8:\n        return oct(total_sequence)\n    elif base == 10:\n        return str(total_sequence)\n    else:\n        res = ''\n        num = total_sequence\n        while num > 0:\n            res = str(num % base) + res\n            num //= base\n        return res"], [0.9126744270324707, "    if n > m or base not in range(3, 13):\n        return -1\n    else:\n        factor_sums, nums = ([], [])\n        for i in range(n, m + 1):\n            factor_sum = sum([j for j in range(1, i + 1) if i % j == 0])\n            factor_sums.append(factor_sum)\n            nums.append(i)\n        weights = [i / sum(factor_sums) for i in factor_sums]\n        weighted_nums = [nums[i] * weights[i] for i in range(len(nums))]\n        median = round(sum(weighted_nums))\n        if base == 10:\n            return str(median)\n        elif base == 2:\n            return bin(median)\n        elif base == 8:\n            return oct(median)\n        else:\n            return hex(median)"], [0.9126744270324707, "    if n > m or base not in range(3, 13):\n        return -1\n    else:\n        factor_sums, nums = ([], [])\n        for i in range(n, m + 1):\n            factor_sum = sum([j for j in range(1, i + 1) if i % j == 0])\n            factor_sums.append(factor_sum)\n            nums.append(i)\n        weights = [i / sum(factor_sums) for i in factor_sums]\n        weighted_nums = [nums[i] * weights[i] for i in range(len(nums))]\n        median = round(sum(weighted_nums))\n        if base == 10:\n            return str(median)\n        elif base == 2:\n            return bin(median)\n        elif base == 8:\n            return oct(median)\n        else:\n            return hex(median)"], [0.9126291275024414, "    if n > m or base < 2 or base > 10:\n        return -1\n    divisor_count = 0\n    divisor_sum = 0\n    for i in range(n, m + 1):\n        divisor_count += sum((1 for x in range(1, i + 1) if i % x == 0))\n        divisor_sum += sum((x for x in range(1, i + 1) if i % x == 0))\n    divisor_weighted_mean = round(divisor_sum / divisor_count)\n    if base == 2:\n        return bin(divisor_weighted_mean)\n    elif base == 8:\n        return oct(divisor_weighted_mean)\n    elif base == 10:\n        return divisor_weighted_mean\n    else:\n        return -1"], [0.9105050563812256, "    if n > m or base < 2 or base > 10:\n        return -1\n    total, weight_sum = (0, 0)\n    for num in range(n, m + 1):\n        weight = count_divisors(num)\n        total += num * weight\n        weight_sum += weight\n    avg = round(total / weight_sum)\n    if base == 2:\n        return bin(avg)\n    elif base == 8:\n        return oct(avg)\n    elif base == 10:\n        return avg\n    else:\n        return int(str(avg), base)"], [0.9104859828948975, "    if n > m:\n        return -1\n    if base < 2 or base > 10:\n        return -1\n    total, total_weight = (0, 0)\n    for i in range(n, m + 1):\n        weight_i, weight_end = alternate_fn(i, m)\n        total += i * weight_i\n        total_weight += weight_i\n    if total_weight == 0:\n        return format(0, '#' + str(base + 1) + 'b')\n    res = int(round(total / total_weight))\n    if base == 10:\n        return str(res)\n    elif base == 2:\n        return format(res, '#0b')\n    elif base == 8:\n        return format(res, '#0o')"], [0.9097390174865723, "    if n > m:\n        return -1\n    if base < 2 or base > 10:\n        return -1\n    total, total_weight = (0, 0)\n    for i in range(n, m + 1):\n        weight_i, weight_end = alternate_fn(i, m)\n        total += i * weight_i\n        total_weight += weight_i\n    if total_weight == 0:\n        return format(0, '#' + str(base + 1) + 'b')\n    res = int(round(total / total_weight))\n    if base == 10:\n        return str(res)\n    elif base == 2:\n        return format(res, 'b')\n    elif base == 8:\n        return format(res, 'o')"], [0.9085877537727356, "    if n >= m or base < 2 or base > 10:\n        return -1\n    total_sum_weight = (0, 0)\n    for i in range(n, m + 1):\n        divs = [1, i] + [x for x in range(2, int(i ** 0.5) + 1) if i % x == 0]\n        divs_for_calc = divs + [i / x for x in divs if x * x != i]\n        div_count = len(divs_for_calc)\n        total_sum_weight += (i * div_count, div_count)\n    weighted_avg = round(total_sum_weight[0] / total_sum_weight[1])\n    total_sequence = (weighted_avg * 2 + total_sum_weight[1] - 1) * total_sum_weight[1] // 2\n    if base == 2:\n        return bin(total_sequence)\n    elif base == 8:\n        return oct(total_sequence)\n    elif base == 10:\n        return str(total_sequence)\n    else:\n        num = total_sequence\n        res = ''\n        while num > 0:\n            res = str(num % base) + res\n            num //= base\n        return res"]]}
{"task_id": "HumanEval/104", "problem": [[0.9239221811294556, "    unique_list = []\n    for ele in x:\n        if ele not in unique_list:\n            digit_sum = sum((int(digit) for digit in str(ele)))\n            if digit_sum % 2 == 1:\n                unique_list.append(ele)\n    return sorted(unique_list)"], [0.9226208925247192, "    unique_nums = set(x)\n    odd_digits_sum_nums = [num for num in unique_nums if sum((int(digit) for digit in str(num))) % 2 != 0]\n    return sorted(odd_digits_sum_nums)"], [0.9164827466011047, "    result = []\n    for num in x:\n        if num < 0:\n            continue\n        digit_sum = sum((int(digit) for digit in str(num)))\n        if digit_sum % 2 == 0:\n            continue\n        if num in result:\n            continue\n        result.append(num)\n    return sorted(result)"], [0.9164765477180481, "    result = []\n    for num in x:\n        if num < 0:\n            continue\n        digit_sum = sum((int(digit) for digit in str(num)))\n        if digit_sum % 2 == 0:\n            continue\n        if num in result:\n            continue\n        result.append(num)\n    return sorted(result)"], [0.9155070781707764, "    odd_sum_digits = []\n    for i in set(x):\n        if sum((int(digit) for digit in str(i))) % 2 != 0:\n            odd_sum_digits.append(i)\n    return sorted(odd_sum_digits)"], [0.9152475595474243, "    lst = [int(x) for x in lst]\n    if any((x < 0 for x in lst)):\n        raise ValueError('Negative numbers are not allowed')\n    if len(set(lst)) != len(lst):\n        raise ValueError('Duplicate numbers are not allowed')\n    result = [x for x in lst if 10 < x < 100 and x % 2 != 0]\n    result.sort()\n    return result"], [0.9088971614837646, "    odd_numbers = [num for num in arr if num % 2 != 0]\n    odd_numbers = sort_odd_numbers(odd_numbers)\n    odd_numbers = remove_duplicates(odd_numbers)\n    return odd_numbers"], [0.9085005521774292, "    odd_sum_set = set()\n    for num in x:\n        if sum((int(digit) for digit in str(num))) % 2 != 0:\n            odd_sum_set.add(num)\n    return sorted(list(odd_sum_set))"], [0.9075504541397095, "    odd_numbers = []\n    for num in input_list:\n        if num % 2 != 0:\n            odd_numbers.append(num)\n    odd_numbers.sort()\n    odd_numbers = list(set(odd_numbers))\n    return odd_numbers"], [0.907029926776886, "    if not arr:\n        return []\n    first = arr[0]\n    if first % 2 == 0:\n        return remove_even_duplicates(arr[1:])\n    return [first] + remove_even_duplicates([x for x in arr if x != first])"]]}
{"task_id": "HumanEval/105", "problem": [[0.9439730644226074, "    num2words = {1: 'One', 2: 'Two', 3: 'Three', 4: 'Four', 5: 'Five', 6: 'Six', 7: 'Seven', 8: 'Eight', 9: 'Nine'}\n    valid_nums = sorted([n for n in arr if 1 <= n <= 9], reverse=True)\n    return [num2words[n] for n in valid_nums]"], [0.9076486825942993, "    ones = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']\n    teens = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']\n    tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']\n    words = ''\n    if num < 10:\n        words += ones[num]\n    elif num < 20:\n        words += teens[num % 10]\n    else:\n        words += tens[num // 10]\n        if num % 10 != 0:\n            words += ' ' + ones[num % 10]\n    return words"], [0.905189037322998, "    clean_arr = [''.join(filter(str.isalpha, item.lower())) for item in arr]\n    sorted_arr = sorted(clean_arr, key=len)\n    reversed_str = [item[::-1] for item in sorted_arr]\n    return reversed_str"], [0.9047633409500122, "    filtered_arr = [x for x in arr if x <= 10 or x % 5 != 0]\n    filtered_arr.sort(reverse=True)\n    return filtered_arr"], [0.9044753909111023, "    converted_nums = []\n    for num in arr:\n        try:\n            converted_nums.append(int(num))\n        except ValueError:\n            continue\n    n = len(converted_nums)\n    for i in range(n):\n        for j in range(0, n - i - 1):\n            if converted_nums[j] < converted_nums[j + 1]:\n                converted_nums[j], converted_nums[j + 1] = (converted_nums[j + 1], converted_nums[j])\n    return converted_nums"], [0.903559148311615, "    if num == 9:\n        return 'nine'"], [0.902928352355957, "    lt_20 = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']\n    gt_20 = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']\n    if N < 20:\n        return lt_20[N]\n    if N < 100:\n        return gt_20[N // 10] + ' ' + lt_20[N % 10]\n    if N < 1000:\n        return lt_20[N // 100] + ' hundred ' + convertToWords(N % 100)"], [0.9026180505752563, "    if num == 100:\n        return 'one hundred'\n    elif num < 10:\n        return ones[num]\n    elif num < 20:\n        return teens[num - 10]\n    elif num < 100:\n        if num % 10 == 0:\n            return tens[num // 10]\n        else:\n            return tens[num // 10] + '-' + ones[num % 10]"], [0.902556300163269, "    if num == 0:\n        return 'zero'\n    digits = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']\n    teens = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']\n    tens = ['twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety']\n    num_words = ''\n    if num >= 1000:\n        num_words += digits[int(num / 1000) - 1] + ' thousand '\n        num %= 1000\n    if num >= 100:\n        num_words += digits[int(num / 100) - 1] + ' hundred '\n        num %= 100\n    if num >= 20:\n        num_words += tens[int(num / 10) - 2] + ' '\n        num %= 10\n    if num >= 10:\n        num_words += teens[num - 10] + ' '\n    else:\n        num_words += digits[num - 1] + ' '\n    return num_words.strip()"], [0.9024184942245483, "    number_words = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine', 10: 'ten', 11: 'eleven', 12: 'twelve', 13: 'thirteen', 14: 'fourteen', 15: 'fifteen', 16: 'sixteen', 17: 'seventeen', 18: 'eighteen', 19: 'nineteen'}\n    tens_words = {20: 'twenty', 30: 'thirty', 40: 'forty', 50: 'fifty', 60: 'sixty', 70: 'seventy', 80: 'eighty', 90: 'ninety'}\n    if number < 20:\n        return number_words[number]\n    elif number < 100:\n        tens = number // 10 * 10\n        ones = number % 10\n        return tens_words[tens] + '-' + number_words[ones] if ones > 0 else tens_words[tens]\n    else:\n        hundreds = number // 100\n        remainder = number % 100\n        if remainder > 0:\n            return number_words[hundreds] + ' hundred ' + convert_number_to_words(remainder)\n        else:\n            return number_words[hundreds] + ' hundred'"]]}
{"task_id": "HumanEval/106", "problem": [[0.9349962472915649, "    result = []\n    for i in range(1, n + 1):\n        if i % 2 == 0:\n            result.append(sum(range(i + 1)))\n        else:\n            result.append(math.factorial(i))\n    return result"], [0.9349782466888428, "    result = []\n    for i in range(1, n + 1):\n        if i % 2 == 0:\n            result.append(sum(range(i + 1)))\n        else:\n            result.append(math.factorial(i))\n    return result"], [0.9334205389022827, "    for i in range(n):\n        if i % 2 == 0:\n            resultList[i] = factorial(i)\n        else:\n            resultList[i] = cumulative_sum(i)"], [0.9305440187454224, "    resultList = [0] * n\n    for i in range(n):\n        if i % 2 == 0:\n            resultList[i] = factorial(i)\n        else:\n            resultList[i] = cumulative_sum(i)\n    return resultList"], [0.928083598613739, "    elif n == 1:\n        return [1]\n    else:\n        array = list(range(1, n + 1))\n        odd_numbers = [num for num in array if num % 2 != 0]\n        factorial_numbers = [factorial(num) for num in odd_numbers]\n        return factorial_numbers"], [0.9263874292373657, "    for i in range(1, n + 1):\n        if i % 2 == 0:\n            result.append(sum(range(i + 1)))\n        else:\n            result.append(math.factorial(i))"], [0.926377534866333, "    for i in range(1, n + 1):\n        if i % 2 == 0:\n            result.append(sum(range(i + 1)))\n        else:\n            result.append(math.factorial(i))"], [0.9260532855987549, "    if i % 2 == 0:\n        return math.factorial(i)\n    else:\n        return sum(range(1, i + 1))"], [0.9260532855987549, "    if i % 2 == 0:\n        return math.factorial(i)\n    else:\n        return sum(range(1, i + 1))"], [0.9242022037506104, "        if i % 2 == 0:\n            resultList[i] = factorial(i)\n        else:\n            resultList[i] = cumulative_sum(i)"]]}
{"task_id": "HumanEval/107", "problem": [[0.9099169969558716, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9099094867706299, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9098970890045166, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9098914861679077, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9090319275856018, "    even_count = 0\n    odd_count = 0\n    num = abs(num)\n    for digit in str(num):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9086751937866211, "    str_n = str(n)\n    decimal_palindrome = str_n == str_n[::-1]\n    binary_n = bin(n).replace('0b', '')\n    binary_palindrome = binary_n == binary_n[::-1]\n    return (decimal_palindrome, binary_palindrome)"], [0.9085236191749573, "    palindromes = []\n    largest_palindrome = 0\n    for i in range(1, n + 1):\n        if is_palindrome(i):\n            palindromes.append(i)\n            if i > largest_palindrome:\n                largest_palindrome = i\n    return (palindromes, largest_palindrome)"], [0.9082458019256592, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if digit.isdigit():\n            if int(digit) % 2 == 0:\n                even_count += 1\n            else:\n                odd_count += 1\n    return (even_count, odd_count)"], [0.9072295427322388, "    even_count = 0\n    odd_count = 0\n    for num in arr:\n        if num % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9064913988113403, "    even_count = 0\n    odd_count = 0\n    num = abs(num)\n    for digit in str(num):\n        if digit != '0':\n            if int(digit) % 2 == 0:\n                even_count += 1\n            else:\n                odd_count += 1\n        else:\n            even_count += 1\n    return (even_count, odd_count)"]]}
{"task_id": "HumanEval/108", "problem": [[0.9186872243881226, "    count = 0\n    for i in arr:\n        if i > 0:\n            count += 1\n    return count"], [0.9140210151672363, "    count = 0\n    for num in nums:\n        if num > 0:\n            count += 1\n    print('Number of positive numbers:', count)"], [0.9126380681991577, "    count = 0\n    for num in numbers:\n        if num > 0:\n            count += 1\n    return count"], [0.9114486575126648, "    return sum((1 for num in arr if num > 0))"], [0.9106417298316956, "    count = 0\n    for num in nums:\n        if num > 0:\n            count += 1\n    return count"], [0.9104793667793274, "    return sum([num for num in arr if num > 0])"], [0.9103732109069824, "    if not arr:\n        return 0\n    else:\n        current_num = arr[0]\n        if current_num > 0:\n            return current_num + sum_of_positives(arr[1:])\n        else:\n            return sum_of_positives(arr[1:])"], [0.9103732109069824, "    if not arr:\n        return 0\n    else:\n        current_num = arr[0]\n        if current_num > 0:\n            return current_num + sum_of_positives(arr[1:])\n        else:\n            return sum_of_positives(arr[1:])"], [0.9096509218215942, "    count = 0\n    for num in arr:\n        digit_sum = sum((int(digit) for digit in str(abs(num))))\n        if num < 0:\n            digit_sum = -digit_sum\n        if digit_sum > 0 and digit_sum % 4 == 0:\n            count += 1\n    return count"], [0.9095370769500732, "    return sum((x for x in arr if x > 0))"]]}
{"task_id": "HumanEval/109", "problem": [[0.9151409268379211, "    right_shifts_required = 0\n    if len(arr) == 0 or len(arr) == 1:\n        return [True, right_shifts_required]\n    for i in range(len(arr) - 1, 0, -1):\n        if arr[i] < arr[i - 1]:\n            if right_shifts_required != 0:\n                return [False, -1]\n            right_shifts_required = i\n    return [True, right_shifts_required]"], [0.9050660729408264, "    for i in range(len(arr) - 1, 0, -1):\n        if arr[i] < arr[i - 1]:\n            if right_shifts_required != 0:\n                return [False, -1]\n            right_shifts_required = i"], [0.9039638042449951, "    if len(arr) == 0:\n        return True\n    for j in range(len(arr)):\n        new_arr = arr[j:] + arr[:j]\n        if is_sorted(new_arr):\n            return True\n    return False"], [0.9039446115493774, "    if len(arr) == 0:\n        return True\n    for _ in range(len(arr)):\n        odd_count = 0\n        even_count = 0\n        for num in arr:\n            if num % 2 == 1:\n                odd_count += 1\n            if odd_count > 0 and num % 2 == 0:\n                even_count += 1\n        if even_count == len(arr) - odd_count:\n            return True\n        arr.append(arr.pop(0))\n    return False"], [0.9018522500991821, "    for j in range(len(arr)):\n        new_arr = arr[j:] + arr[:j]\n        if is_sorted(new_arr):\n            return True"], [0.9001134634017944, "    for _ in range(len(arr)):\n        odd_count = 0\n        even_count = 0\n        for num in arr:\n            if num % 2 == 1:\n                odd_count += 1\n            if odd_count > 0 and num % 2 == 0:\n                even_count += 1\n        if even_count == len(arr) - odd_count:\n            return True\n        arr.append(arr.pop(0))"], [0.8988852500915527, "    return move_two_balls(arr) and count_smaller_than_first(arr)"], [0.8968949317932129, "    if arr == sorted(arr):\n        return True\n    elif arr == sorted(arr, reverse=True):\n        return True\n    else:\n        return False"], [0.8968949317932129, "    if arr == sorted(arr):\n        return True\n    elif arr == sorted(arr, reverse=True):\n        return True\n    else:\n        return False"], [0.8965829610824585, "    n = len(arr)\n    if n <= 1:\n        return True\n    for i in range(1, n):\n        if arr[i] < arr[i - 1]:\n            return False\n    return True"]]}
{"task_id": "HumanEval/110", "problem": [[0.935279130935669, "    odd1 = sum((1 for num in lst1 if num % 2 != 0))\n    even2 = sum((1 for num in lst2 if num % 2 == 0))\n    return 'YES' if odd1 == even2 else 'NO'"], [0.9339094161987305, "    for i in range(len(lst1)):\n        if lst1[i] % 2 != 0:\n            has_swap = False\n            for j in range(len(lst2)):\n                if lst2[j] % 2 == 0:\n                    lst1[i], lst2[j] = (lst2[j], lst1[i])\n                    has_swap = True\n                    break\n            if not has_swap:\n                return 'NO'"], [0.932579755783081, "    if sum(lst1) % 2 != 0 or sum(lst2) % 2 != 0:\n        return 'No'\n    for i in range(len(lst1)):\n        if lst1[i] % 2 != 0:\n            has_swap = False\n            for j in range(len(lst2)):\n                if lst2[j] % 2 == 0:\n                    lst1[i], lst2[j] = (lst2[j], lst1[i])\n                    has_swap = True\n                    break\n            if not has_swap:\n                return 'NO'\n    return 'YES'"], [0.9311299920082092, "    sum_lst1 = sum(lst1)\n    sum_lst2 = sum(lst2)\n    if (sum_lst1 + sum_lst2) % 2 != 0:\n        return 'NO'\n    has_odd_lst1 = any((i % 2 != 0 for i in lst1))\n    has_even_lst2 = any((i % 2 == 0 for i in lst2))\n    return 'YES' if has_odd_lst1 and has_even_lst2 else 'NO'"], [0.930328369140625, "    sum1, sum2 = (sum(lst1), sum(lst2))\n    if (sum1 + sum2) % 2 == 1:\n        return 'NO'\n    odd1 = min((i for i in lst1 if i % 2 == 1)) if any((i % 2 == 1 for i in lst1)) else float('inf')\n    even2 = min((i for i in lst2 if i % 2 == 0)) if any((i % 2 == 0 for i in lst2)) else float('inf')\n    if odd1 == float('inf') or even2 == float('inf') or odd1 > even2:\n        return 'NO'\n    return 'YES'"], [0.9302670359611511, "    if (sum(lst1) + sum(lst2)) % 2 != 0:\n        return 'NO'\n    odd_lst1 = [x for x in lst1 if x % 2 != 0]\n    even_lst2 = [x for x in lst2 if x % 2 == 0]\n    if len(odd_lst1) > len(even_lst2):\n        return 'NO'\n    return 'YES'"], [0.9300742149353027, "    swap_lst1 = [x for x in lst1 if x % 2 != 0]\n    swap_lst2 = [x for x in lst2 if x % 2 == 0]\n    if (sum(lst1) + sum(lst2)) % 2 != 0:\n        return 'NO'\n    if len(swap_lst1) == len(swap_lst2):\n        return 'YES'\n    else:\n        return 'NO'"], [0.9299088716506958, "    lst1_odd = [i for i in lst1 if i % 2 != 0]\n    lst2_even = [i for i in lst2 if i % 2 == 0]\n    for odd in lst1_odd:\n        for even in lst2_even:\n            if odd - even == (sum(lst1) - sum(lst2)) // 2:\n                return 'YES'\n    return 'NO'"], [0.9297925233840942, "    sum1, sum2 = (sum(lst1), sum(lst2))\n    even_sum1, even_sum2 = (sum((i for i in lst1 if i % 2 == 0)), sum((i for i in lst2 if i % 2 == 0)))\n    odd_sum1, odd_sum2 = (sum1 - even_sum1, sum2 - even_sum2)\n    if abs(odd_sum1 - odd_sum2) % 2 != 0:\n        return 'NO'\n    return 'YES'"], [0.9297876358032227, "    sum1, sum2 = (sum(lst1), sum(lst2))\n    even_sum1, even_sum2 = (sum((i for i in lst1 if i % 2 == 0)), sum((i for i in lst2 if i % 2 == 0)))\n    odd_sum1, odd_sum2 = (sum1 - even_sum1, sum2 - even_sum2)\n    if abs(odd_sum1 - odd_sum2) % 2 != 0:\n        return 'NO'\n    return 'YES'"]]}
{"task_id": "HumanEval/111", "problem": [[0.9417455196380615, "    count = {}\n    max_count = 0\n    max_count_chars = []\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n            if count[char.lower()] > max_count:\n                max_count = count[char.lower()]\n    for char, char_count in count.items():\n        if char_count == max_count:\n            max_count_chars.append(char)\n    result = {char: max_count for char in max_count_chars}\n    return result"], [0.9397285580635071, "    count = {}\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n    max_count = 0\n    for char, cnt in count.items():\n        if cnt > max_count:\n            max_count = cnt\n    max_chars = {}\n    for char, cnt in count.items():\n        if cnt == max_count:\n            max_chars[char] = cnt\n    return max_chars"], [0.9390907287597656, "    count = {}\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n    max_value = max(count.values()) if count else 0\n    return {k: v for k, v in count.items() if v == max_value}"], [0.9377082586288452, "    count = {}\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n    max_freq = max(count.values()) if count else 0\n    return {char: count for char, count in count.items() if count == max_freq}"], [0.937471866607666, "    import re\n    test = re.sub('[^A-Za-z0-9 ]+', '', test)\n    test = test.lower()\n    letters = test.split(' ')\n    histogram = {}\n    for letter in letters:\n        if letter:\n            histogram[letter + '_' + str(letters.count(letter))] = letters.count(letter)\n    return histogram"], [0.9371655583381653, "    count = {}\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n    max_count = max(count.values(), default=0)\n    return {char: count_ for char, count_ in count.items() if count_ == max_count}"], [0.937090277671814, "    count = {}\n    for char in test:\n        if char != ' ':\n            if char.lower() in count:\n                count[char.lower()] += 1\n            else:\n                count[char.lower()] = 1\n    max_freq = max(count.values(), default=0)\n    return {k: v for k, v in count.items() if v == max_freq}"], [0.9346421360969543, "    tally = {}\n    max_count = 0\n    for chartype in test:\n        if chartype != ' ':\n            if chartype.lower() in tally:\n                tally[chartype.lower()] += 1\n            else:\n                tally[chartype.lower()] = 1\n            if tally[chartype.lower()] > max_count:\n                max_count = tally[chartype.lower()]\n    return tally"], [0.9321920871734619, "    count = {}\n    for char in test:\n        if char != ' ':\n            char = char.lower()\n            if char in count:\n                count[char] += 1\n            else:\n                count[char] = 1\n    max_freq = max(count.values()) if count else 0\n    max_freq_chars = {k: v for k, v in count.items() if v == max_freq}\n    return max_freq_chars"], [0.9310002326965332, "    histogram = {}\n    for char in test:\n        char = char.lower()\n        histogram[char] = histogram.get(char, 0) + 1\n    histogram_list = sorted(histogram.items(), key=lambda x: x[0])\n    return histogram_list"]]}
{"task_id": "HumanEval/112", "problem": [[0.9100486040115356, "    s = ''.join((s[i] for i in range(len(s)) if s[i] != s[i - 1] and s[i] not in c))\n    return (s, s == s[::-1])"], [0.909625768661499, "    result = ''.join((ch for ch in s if ch not in c))\n    palindrome = result == result[::-1]\n    num_alphabets = len(set(result))\n    return (result, palindrome, num_alphabets == n)"], [0.8963276147842407, "    s = s.lower()\n    special_chars = [',', '.', '!', '?', ' ', \"'\"]\n    for special_char in special_chars:\n        s = s.replace(special_char, '')\n    if not s == s[::-1]:\n        return 'The string is not a palindrome.'\n    else:\n        s = s.replace(' ', '')\n        words = s.split()\n        palindromes = [word for word in words if word == word[::-1]]\n        return palindromes"], [0.890853226184845, "    modified_string = string.replace(char, '')\n    reversed_string = modified_string[::-1]\n    return reversed_string"], [0.8890777826309204, "    word = word.lower()\n    reversed_word = word[::-1]\n    if word == reversed_word:\n        return 'Characteristics of a palindrome present.'\n    else:\n        return 'Characteristics of a palindrome absent.'"]]}
{"task_id": "HumanEval/113", "problem": [[0.9508276581764221, "    output = []\n    for idx, str in enumerate(lst):\n        odd_count = sum((1 for s in str if int(s) % 2 != 0))\n        even_count = sum((1 for s in str if int(s) % 2 == 0))\n        replace_string = f'the number of odd elements {odd_count}n the str{even_count}ng {even_count} of the {odd_count}nput.'\n        output.append(replace_string)\n    return output"], [0.9489438533782959, "    result = []\n    for i, s in enumerate(lst):\n        if not isinstance(s, str):\n            raise ValueError('ERROR: All elements in the list must be strings.')\n        try:\n            odd_nums = len([int(n) for n in s if int(n) % 2 != 0])\n        except ValueError:\n            raise ValueError('ERROR: All characters in the strings must be numeric.')\n        result.append('the calculation of odd segments {}n the str{}ng {} of the {}nput set.'.format(odd_nums, i + 1, odd_nums, i + 1))\n    return result"], [0.947394609451294, "    result = []\n    for idx, s in enumerate(lst, 1):\n        odd_digits = sum((int(ch) % 2 for ch in s if ch.isdigit()))\n        if odd_digits == 0:\n            raise ValueError(f\"The string '{s}' contains no digits.\")\n        result.append(f'the quantity of odd components {odd_digits}n the str{odd_digits}ng {idx} of the {idx}nput.')\n    return result"], [0.9471353888511658, "    output = []\n    for idx, string in enumerate(lst):\n        odd_count = sum((1 for s in string if int(s) % 2 != 0))\n        even_count = sum((1 for s in string if int(s) % 2 == 0))\n        replace_string = f'the number of odd elements are {odd_count} of the string {even_count} of the input'\n        output.append(replace_string)\n    return output"], [0.9466519355773926, "    result = []\n    for i, s in enumerate(lst):\n        if not isinstance(s, str):\n            return 'ERROR'\n        if not s.isdigit():\n            return 'ERROR'\n        odd_count = sum((1 for char in s if int(char) % 2 != 0))\n        result.append('the count of odd parts {}n the str{}ng {} of the {}nput.'.format(odd_count, odd_count, odd_count, odd_count))\n    return result"], [0.9396233558654785, "    for i, s in enumerate(lst):\n        if not isinstance(s, str):\n            return 'ERROR'\n        if not s.isdigit():\n            return 'ERROR'\n        odd_count = sum((1 for char in s if int(char) % 2 != 0))\n        result.append('the count of odd parts {}n the str{}ng {} of the {}nput.'.format(odd_count, odd_count, odd_count, odd_count))"], [0.9391834735870361, "    for i, s in enumerate(lst):\n        if not isinstance(s, str):\n            raise ValueError('ERROR: All elements in the list must be strings.')\n        try:\n            odd_nums = len([int(n) for n in s if int(n) % 2 != 0])\n        except ValueError:\n            raise ValueError('ERROR: All characters in the strings must be numeric.')\n        result.append('the calculation of odd segments {}n the str{}ng {} of the {}nput set.'.format(odd_nums, i + 1, odd_nums, i + 1))"], [0.9390414357185364, "    for idx, str in enumerate(lst):\n        odd_count = sum((1 for s in str if int(s) % 2 != 0))\n        even_count = sum((1 for s in str if int(s) % 2 == 0))\n        replace_string = f'the number of odd elements {odd_count}n the str{even_count}ng {even_count} of the {odd_count}nput.'\n        output.append(replace_string)"], [0.9389358758926392, "    for idx, s in enumerate(lst, 1):\n        odd_digits = sum((int(ch) % 2 for ch in s if ch.isdigit()))\n        if odd_digits == 0:\n            raise ValueError(f\"The string '{s}' contains no digits.\")\n        result.append(f'the quantity of odd components {odd_digits}n the str{odd_digits}ng {idx} of the {idx}nput.')"], [0.9386336207389832, "    result = []\n    for s in lst:\n        count = sum((int(c) % 2 == 0 for c in s if c.isdigit()))\n        result.append(f'the number of even characters {count}n the str{count}ng {count} of the {count}nput.')\n    return result"]]}
{"task_id": "HumanEval/114", "problem": [[0.9226868748664856, "    min_prefix = 0\n    prefix = 0\n    for num in nums:\n        prefix += num\n        min_prefix = min(min_prefix, prefix)\n    return -min_prefix if min_prefix < 0 else 0"], [0.9226727485656738, "    min_prefix = 0\n    prefix = 0\n    for num in nums:\n        prefix += num\n        min_prefix = min(min_prefix, prefix)\n    return -min_prefix if min_prefix < 0 else 0"], [0.9185606837272644, "    for num in nums:\n        sum += num\n        min_sum = min(min_sum, sum)"], [0.9156765937805176, "    for num in nums:\n        curr_sum += num\n        min_sum = min(min_sum, curr_sum)"], [0.9135719537734985, "    current_sum = min_sum = nums[0]\n    for num in nums[1:]:\n        current_sum = min(num, current_sum + num)\n        min_sum = min(min_sum, current_sum)\n    return min_sum"], [0.9133195877075195, "    for num in nums:\n        prefix += num\n        min_prefix = min(min_prefix, prefix)"], [0.913304328918457, "    for num in nums:\n        prefix += num\n        min_prefix = min(min_prefix, prefix)"]]}
{"task_id": "HumanEval/115", "problem": [[0.9311409592628479, "    count = [0] * len(grid[0])\n    for row in grid:\n        for j in range(len(row)):\n            count[j] += row[j]\n    count.sort()\n    time = 0\n    while count:\n        i = len(count) - 1\n        while i >= 0 and count[i] > 0:\n            count[i] -= bucket_capacity\n            i -= 1\n        count = [x for x in count if x > 0]\n        time += 1\n    return time - 1 if len(grid[0]) > bucket_capacity else time"], [0.9289500117301941, "    rows, cols = (len(grid), len(grid[0]))\n    lowerings = 0\n    for i in range(rows):\n        remaining_capacity = capacity\n        for j in range(cols):\n            if grid[i][j] == 1:\n                remaining_capacity -= 1\n                if remaining_capacity == 0:\n                    lowerings += 1\n                    remaining_capacity = capacity\n        if remaining_capacity != capacity:\n            lowerings += 1\n    return lowerings"], [0.9204750061035156, "    for i in range(rows):\n        remaining_capacity = capacity\n        for j in range(cols):\n            if grid[i][j] == 1:\n                remaining_capacity -= 1\n                if remaining_capacity == 0:\n                    lowerings += 1\n                    remaining_capacity = capacity\n        if remaining_capacity != capacity:\n            lowerings += 1"], [0.9107372760772705, "            if grid[i][j] == 1:\n                remaining_capacity -= 1\n                if remaining_capacity == 0:\n                    lowerings += 1\n                    remaining_capacity = capacity"], [0.9101908206939697, "        for j in range(cols):\n            if grid[i][j] == 1:\n                remaining_capacity -= 1\n                if remaining_capacity == 0:\n                    lowerings += 1\n                    remaining_capacity = capacity"], [0.8946092128753662, "    if not grid or not grid[0]:\n        return 0\n    rows, cols = (len(grid), len(grid[0]))\n    left_max = [0] * rows\n    right_max = [0] * rows\n    water_volume = 0\n    for j in range(cols):\n        cur_left_max = 0\n        cur_right_max = 0\n        for i in range(rows):\n            left_max[i] = max(left_max[i], cur_left_max)\n            cur_left_max = max(cur_left_max, grid[i][j])\n            right_max[rows - 1 - i] = max(right_max[rows - 1 - i], cur_right_max)\n            cur_right_max = max(cur_right_max, grid[rows - 1 - i][j])\n        for i in range(rows):\n            height = min(left_max[i], right_max[i]) - grid[i][j]\n            if height > 0:\n                water_volume += height\n    return water_volume"], [0.8942951560020447, "    if not grid or not grid[0]:\n        return 0\n    m, n = (len(grid), len(grid[0]))\n    left_max = [[0] * n for _ in range(m)]\n    right_max = [[0] * n for _ in range(m)]\n    top_max = [[0] * n for _ in range(m)]\n    bottom_max = [[0] * n for _ in range(m)]\n    for i in range(m):\n        for j in range(n):\n            left_max[i][j] = max(left_max[i][j - 1], grid[i][j]) if j > 0 else grid[i][j]\n            top_max[i][j] = max(top_max[i - 1][j], grid[i][j]) if i > 0 else grid[i][j]\n    for i in range(m - 1, -1, -1):\n        for j in range(n - 1, -1, -1):\n            right_max[i][j] = max(right_max[i][j + 1], grid[i][j]) if j < n - 1 else grid[i][j]\n            bottom_max[i][j] = max(bottom_max[i + 1][j], grid[i][j]) if i < m - 1 else grid[i][j]\n    total_water = 0\n    for i in range(m):\n        for j in range(n):\n            water_level = min(left_max[i][j], right_max[i][j], top_max[i][j], bottom_max[i][j])\n            total_water += max(0, water_level - grid[i][j])\n    return total_water"], [0.8938917517662048, "    while count:\n        i = len(count) - 1\n        while i >= 0 and count[i] > 0:\n            count[i] -= bucket_capacity\n            i -= 1\n        count = [x for x in count if x > 0]\n        time += 1"], [0.8931001424789429, "    distance = -1\n    water_cells = deque()\n    n = len(grid)\n    for i in range(n):\n        for j in range(n):\n            if grid[i][j] == 1:\n                water_cells.append((i, j))\n    if not water_cells or len(water_cells) == n * n:\n        return distance\n    directions = ((0, 1), (0, -1), (1, 0), (-1, 0))\n    while water_cells:\n        size = len(water_cells)\n        for _ in range(size):\n            x, y = water_cells.popleft()\n            for dx, dy in directions:\n                newX, newY = (x + dx, y + dy)\n                if 0 <= newX < n and 0 <= newY < n and (grid[newX][newY] == 0):\n                    grid[newX][newY] = 1\n                    water_cells.append((newX, newY))\n        distance += 1\n    return distance - 1"], [0.8893305063247681, "    if n == 0 or capacity == 0:\n        return 0"]]}
{"task_id": "HumanEval/116", "problem": [[0.9380141496658325, "    arr.sort(key=lambda x: (bin(x).count('1'), bin(x).count('0'), -x))\n    return arr"], [0.9359575510025024, "    arr.sort()\n    bin_count = lambda x: bin(x).count('1')\n    arr.sort(key=bin_count)\n    return arr"], [0.9359508752822876, "    arr.sort()\n    bin_count = lambda x: bin(x).count('1')\n    arr.sort(key=bin_count)\n    return arr"], [0.9345101118087769, "    bin_counts = [[str(bin(i)).count('1'), str(bin(int(str(i), 4))).count('1'), str(bin(int(str(i), 16))).count('1'), i] for i in arr]\n    bin_counts.sort()\n    sorted_list = [i[3] for i in bin_counts]\n    return sorted_list"], [0.9311870336532593, "    arr.sort(key=lambda x: (len(bin(abs(x))) - 2, x, bin(abs(x)).count('1')))\n    return arr"], [0.9310650825500488, "    binary_len_arr = [(num, len(bin(num)[2:])) for num in arr]\n    binary_len_arr.sort(key=lambda x: (x[1], x[0]))\n    return [num for num, _ in binary_len_arr]"], [0.9304429888725281, "    return sorted(arr, key=lambda x: (bin(x).count('1'), x))"], [0.9304386377334595, "    return sorted(arr, key=lambda x: (bin(x).count('1'), x))"], [0.9304325580596924, "    return sorted(arr, key=lambda x: (bin(x).count('1'), x))"], [0.9286805391311646, "    return sorted(arr, key=lambda x: (len(bin(x)) - 2, x))"]]}
{"task_id": "HumanEval/117", "problem": [[0.9261029958724976, "    words = s.split()\n    selected_words = []\n    for i in range(len(words)):\n        if count_consonants(words[i]) == n:\n            if selected_words and i > 0 and (count_consonants(words[i - 1]) == n):\n                selected_words[-1] += words[i]\n            else:\n                selected_words.append(words[i])\n    return [(count_vowels(word), word) for word in selected_words]"], [0.9213624000549316, "    for i in range(len(words)):\n        if count_consonants(words[i]) == n:\n            if selected_words and i > 0 and (count_consonants(words[i - 1]) == n):\n                selected_words[-1] += words[i]\n            else:\n                selected_words.append(words[i])"], [0.9196083545684814, "    vowels = 'aeiou'\n    if s == '':\n        return []\n    words = s.split(' ')\n    segments = []\n    for word in words:\n        count = 0\n        start = 0\n        for i in range(len(word)):\n            if word[i].lower() in vowels:\n                count += 1\n            if count == n:\n                segments.append(word[start:i + 1])\n                count = 0\n                start = i + 1\n    return segments"], [0.9142547845840454, "        if count_consonants(words[i]) == n:\n            if selected_words and i > 0 and (count_consonants(words[i - 1]) == n):\n                selected_words[-1] += words[i]\n            else:\n                selected_words.append(words[i])"], [0.9139598608016968, "    vowels = 'aeiou'\n    consonants = 'bcdfghjklmnpqrstvwxyz'\n    if not s:\n        return []\n    phrases_with_required_counts = []\n    current_phrase = []\n    current_consonants = 0\n    current_vowels = 0\n    for word in s.split():\n        word_cons = len([ch for ch in word.lower() if ch in consonants])\n        word_vows = len([ch for ch in word.lower() if ch in vowels])\n        if current_consonants + word_cons == n and current_vowels + word_vows == m:\n            current_phrase.append(word)\n            phrases_with_required_counts.append(' '.join(current_phrase))\n            current_phrase = []\n            current_consonants = 0\n            current_vowels = 0\n        elif current_consonants + word_cons > n or current_vowels + word_vows > m:\n            current_phrase = [word]\n            current_consonants = word_cons\n            current_vowels = word_vows\n        else:\n            current_phrase.append(word)\n            current_consonants += word_cons\n            current_vowels += word_vows\n    return phrases_with_required_counts"], [0.9139412045478821, "    vowels = 'aeiou'\n    consonants = 'bcdfghjklmnpqrstvwxyz'\n    if not s:\n        return []\n    phrases_with_required_counts = []\n    current_phrase = []\n    current_consonants = 0\n    current_vowels = 0\n    for word in s.split():\n        word_cons = len([ch for ch in word.lower() if ch in consonants])\n        word_vows = len([ch for ch in word.lower() if ch in vowels])\n        if current_consonants + word_cons == n and current_vowels + word_vows == m:\n            current_phrase.append(word)\n            phrases_with_required_counts.append(' '.join(current_phrase))\n            current_phrase = []\n            current_consonants = 0\n            current_vowels = 0\n        elif current_consonants + word_cons > n or current_vowels + word_vows > m:\n            current_phrase = [word]\n            current_consonants = word_cons\n            current_vowels = word_vows\n        else:\n            current_phrase.append(word)\n            current_consonants += word_cons\n            current_vowels += word_vows\n    return phrases_with_required_counts"], [0.9119724035263062, "            if selected_words and i > 0 and (count_consonants(words[i - 1]) == n):\n                selected_words[-1] += words[i]\n            else:\n                selected_words.append(words[i])"], [0.9119058847427368, "    if not s:\n        return []\n    vowels = 'aeiouAEIOU'\n    result = []\n    for word in s.split():\n        word_vowels = [char for char in word if char in vowels]\n        if len(word_vowels) == n:\n            result.append(word)\n        else:\n            segments = [word[i:i + n] for i in range(0, len(word), n)]\n            result.extend((segment for segment in segments if sum((ch in vowels for ch in segment)) == n))\n    return result"], [0.9098202586174011, "    vowels = 'aeiouAEIOU'\n    words = s.split()\n    segments = []\n    for word in words:\n        cnt = 0\n        segment = ''\n        for char in word:\n            if char in vowels:\n                cnt += 1\n            segment += char\n            if cnt == n:\n                segments.append(segment)\n                cnt = 0\n                segment = ''\n    return segments"], [0.9094170331954956, "    if not s or not any((letter in s for letter in l)):\n        return []\n    vowels = set(l)\n    words = s.split()\n    result = []\n    for word in words:\n        if sum((1 for ch in word if ch in vowels)) == n:\n            if result and sum((1 for ch in result[-1] if ch in vowels)) == n:\n                removed_vowel = random.choice([vowel for vowel in result[-1] if vowel in vowels])\n                result[-1] = result[-1].replace(removed_vowel, '', 1)\n                result[-1] += word\n            else:\n                result.append(word)\n    return result"]]}
{"task_id": "HumanEval/118", "problem": [[0.9181517362594604, "    vowels = 'AEIOUaeiou'\n    for i in range(1, len(word) - 1):\n        if word[i] in vowels and word[i - 1] not in vowels:\n            return word[i]\n    return ''"], [0.918147623538971, "    vowels = 'AEIOUaeiou'\n    for i in range(1, len(word) - 1):\n        if word[i] in vowels and word[i - 1] not in vowels:\n            return word[i]\n    return ''"], [0.9161227345466614, "    vowels = 'aeiouAEIOU'\n    farthest_index = -1\n    farthest_distance = -1\n    for index, letter in enumerate(word):\n        if letter in vowels:\n            if index != 0 and index != len(word) - 1:\n                left_distance = index - [i for i in range(index) if word[i] not in vowels][-1]\n                right_distance = [i for i in range(index, len(word)) if word[i] not in vowels][0] - index\n                min_distance = min(left_distance, right_distance)\n                if min_distance > farthest_distance:\n                    farthest_index = index\n                    farthest_distance = min_distance\n    return word[farthest_index] if farthest_index != -1 else ''"], [0.9155797362327576, "    vowels_lower = 'aeiou'\n    vowels_upper = 'AEIOU'\n    consonants_lower = 'bcdfghjklmnpqrstvwxyz'\n    consonants_upper = 'BCDFGHJKLMNPQRSTVWXYZ'\n    word = word[::-1]\n    for i in range(1, len(word) - 1):\n        if word[i] in vowels_lower and word[i - 1] in consonants_lower and (word[i + 1] in consonants_lower) or (word[i] in vowels_upper and word[i - 1] in consonants_upper and (word[i + 1] in consonants_upper)):\n            return word[i]\n    return ''"], [0.9152066707611084, "    if len(word) < 3:\n        return ''\n    is_vowel = ['aeiouAEIOU'.find(c) != -1 for c in word]\n    for i in range(len(word) - 2, 0, -1):\n        if is_vowel[i - 1] == is_vowel[i + 1] == False and is_vowel[i] == True:\n            return word[i]\n    return ''"], [0.914842963218689, "    vowels = 'aeiouAEIOU'\n    farthest_index = -1\n    farthest_distance = -1\n    for index, letter in enumerate(word):\n        if letter in vowels:\n            if index != 0 and index != len(word) - 1:\n                left_distance = index - max((i for i in range(index) if word[i] not in vowels))\n                right_distance = min((i for i in range(index, len(word)) if word[i] not in vowels)) - index\n                min_distance = min(left_distance, right_distance)\n                if min_distance > farthest_distance:\n                    farthest_index = index\n                    farthest_distance = min_distance\n    return word[farthest_index] if farthest_index != -1 else ''"], [0.9147351980209351, "    reversed_word = word[::-1]\n    for i in range(1, len(reversed_word) - 1):\n        if reversed_word[i] in 'aeiouAEIOU' and reversed_word[i - 1] not in 'aeiouAEIOU' and (reversed_word[i + 1] not in 'aeiouAEIOU'):\n            return reversed_word[i]\n    return ''"], [0.9147257804870605, "    reversed_word = word[::-1]\n    for i in range(1, len(reversed_word) - 1):\n        if reversed_word[i] in 'aeiouAEIOU' and reversed_word[i - 1] not in 'aeiouAEIOU' and (reversed_word[i + 1] not in 'aeiouAEIOU'):\n            return reversed_word[i]\n    return ''"], [0.9143480062484741, "    vowels = 'aeiouAEIOU'\n    for i in range(len(word) - 1, 0, -1):\n        if word[i] in vowels and word[i - 1] not in vowels and (word[i + 1] not in vowels):\n            return word[i]\n    return ''"], [0.9132934808731079, "    vowels = 'aeiouAEIOU'\n    for i in reversed(range(1, len(word) - 1)):\n        if word[i] in vowels and word[i - 1] not in vowels and (word[i + 1] not in vowels):\n            return word[i]\n    return ''"]]}
{"task_id": "HumanEval/119", "problem": [[0.9256728887557983, "    string = ''.join(lst)\n    parentheses_stack = []\n    for i in string:\n        if i == '(':\n            parentheses_stack.append(i)\n        else:\n            if not parentheses_stack:\n                return 'No'\n            parentheses_stack.pop()\n    if parentheses_stack:\n        return 'No'\n    return 'Yes'"], [0.9228885769844055, "    total = ''.join(lst)\n    stack = []\n    for char in total:\n        if char == '(':\n            stack.append(char)\n        elif char == ')':\n            if not stack:\n                return 'No'\n            stack.pop()\n    return 'Yes' if not stack else 'No'"], [0.9212137460708618, "    opening_parentheses = ['(', '[']\n    closing_parentheses = [')', ']']\n    stack = []\n    s = ''.join(lst)\n    for i in s:\n        if i in opening_parentheses:\n            stack.append(i)\n        elif i in closing_parentheses:\n            if not stack or opening_parentheses.index(stack.pop()) != closing_parentheses.index(i):\n                return 'No'\n    if stack:\n        return 'No'\n    return 'Yes'"], [0.9212011098861694, "    str_lst = ''.join(lst)\n    depth = 0\n    for c in str_lst:\n        if c == '(':\n            depth += 1\n        elif c == ')':\n            depth -= 1\n        if depth < 0:\n            return 'No'\n    if depth != 0:\n        return 'No'\n    return 'Yes'"], [0.9201107025146484, "    stack = []\n    bracket_map = {'(': ')', '[': ']'}\n    for bracket in lst[0] + lst[1]:\n        if bracket in bracket_map:\n            stack.append(bracket)\n        else:\n            try:\n                if bracket_map[stack.pop()] != bracket:\n                    return False\n            except IndexError:\n                return False\n    return stack == []"], [0.91965651512146, "    for sub in lst:\n        for char in sub:\n            if char == '(':\n                opening_brackets += 1\n            elif char == ')':\n                if opening_brackets == 0:\n                    return 'No'\n                opening_brackets -= 1"], [0.9195977449417114, "    for c in str_lst:\n        if c == '(':\n            depth += 1\n        elif c == ')':\n            depth -= 1\n        if depth < 0:\n            return 'No'"], [0.9190965294837952, "    for string in lst:\n        for char in string:\n            if char == '(':\n                stack.append(char)\n            elif char == ')':\n                if not stack or stack.pop() != '(':\n                    return 'No'"], [0.9190124273300171, "    stack = []\n    for string in lst:\n        for char in string:\n            if char == '(':\n                stack.append(char)\n            elif char == ')':\n                if not stack or stack.pop() != '(':\n                    return 'No'\n    return 'Yes' if not stack else 'No'"], [0.9165945649147034, "    opening_brackets = 0\n    for sub in lst:\n        for char in sub:\n            if char == '(':\n                opening_brackets += 1\n            elif char == ')':\n                if opening_brackets == 0:\n                    return 'No'\n                opening_brackets -= 1\n    return 'Yes' if opening_brackets == 0 else 'No'"]]}
{"task_id": "HumanEval/120", "problem": [[0.9259288907051086, "    if len(arr) < k:\n        return arr\n    for i in range(1, len(arr)):\n        j = i - 1\n        while j >= 0 and arr[j] < arr[j + 1]:\n            arr[j], arr[j + 1] = (arr[j + 1], arr[j])\n            j -= 1\n    return arr[:k]"], [0.9252508878707886, "    if k <= len(arr) and k > 0:\n        max_heap = [-num for num in arr]\n        heapq.heapify(max_heap)\n        for _ in range(k):\n            smallest = heapq.heappop(max_heap)\n        return -smallest"], [0.9226902723312378, "    arr.sort(reverse=True)\n    ans = []\n    for i in range(k):\n        ans.append(arr[i])\n    return ans"], [0.9219975471496582, "    arr.sort()\n    return arr[:-k]"], [0.9205211400985718, "    top_k = []\n    for num in arr:\n        if len(top_k) < k:\n            top_k.append(num)\n        else:\n            min_num = min(top_k)\n            if num > min_num:\n                top_k.remove(min_num)\n                top_k.append(num)\n    return top_k"], [0.9191430807113647, "    arr.sort(reverse=True)\n    return arr[:k]"], [0.9184861183166504, "    arr.sort()\n    return arr[len(arr) - k]"], [0.9184821248054504, "    arr.sort()\n    return arr[len(arr) - k]"], [0.9184650182723999, "    arr.sort()\n    return arr[-k:]"], [0.9174765348434448, "    freq_dict = {}\n    for i in arr:\n        if i in freq_dict:\n            freq_dict[i] += 1\n        else:\n            freq_dict[i] = 1\n    sorted_freq_dict = sorted(freq_dict.items(), key=lambda kv: kv[1], reverse=True)\n    k_most_freq = []\n    for i in range(k):\n        k_most_freq.append(sorted_freq_dict[i][0])\n    return k_most_freq"]]}
{"task_id": "HumanEval/121", "problem": [[0.9382939338684082, "    return sum((x for x in lst if x % 2 == 0))"], [0.9355632066726685, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9355589747428894, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9355555176734924, "    sum = 0\n    for num in lst:\n        if num % 2 == 0:\n            sum += num\n    return sum"], [0.9354623556137085, "    return sum((num for num in lst if num % 2 == 0))"], [0.9354013204574585, "    sum = 0\n    for ele in lst:\n        if ele % 2 == 1:\n            sum += ele\n    return sum"], [0.9352834224700928, "    sum = 0\n    for num in lst:\n        if num % 2 != 0:\n            sum += num\n    return sum"], [0.9347200393676758, "                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'"], [0.9347178936004639, "                for i in range(0, len(lst), 2):\n                    if isinstance(lst[i], int):\n                        if lst[i] % 2 != 0:\n                            result += lst[i]\n                    else:\n                        return 'Error: List contains non-integer element.'"], [0.9340937733650208, "    sum_even = 0\n    for i in lst:\n        if i % 2 == 0:\n            sum_even += i\n    return sum_even"]]}
{"task_id": "HumanEval/122", "problem": [[0.8954623937606812, "    if K <= len(arr) // 2:\n        sorted_arr = sorted(arr, reverse=True)\n        sum_of_max_digits = sum(sorted_arr[:K])\n        return sum_of_max_digits\n    else:\n        sorted_arr = sorted(arr)\n        sum_of_min_digits = -sum(sorted_arr[:len(arr) - K])\n        return sum_of_min_digits"], [0.8952850699424744, "    retrieved_elements = arr[2:5]\n    sum_of_elements = sum(retrieved_elements)\n    if sum_of_elements >= 100:\n        return sum_of_elements\n    else:\n        return sum_of_elements / 10"], [0.8914470076560974, "    if K > len(arr):\n        return -1\n    if K <= len(arr) // 2:\n        sorted_arr = sorted(arr, reverse=True)\n        sum_of_max_digits = sum(sorted_arr[:K])\n        return sum_of_max_digits\n    else:\n        sorted_arr = sorted(arr)\n        sum_of_min_digits = -sum(sorted_arr[:len(arr) - K])\n        return sum_of_min_digits"], [0.8906842470169067, "    include = 0\n    exclude = 0\n    selected_elements = set()\n    for i in range(len(arr)):\n        new_include = max(include, exclude)\n        include = arr[i] + exclude\n        exclude = max(include, exclude)\n        include = new_include\n        if arr[i] % 2 == 1 or arr[i] < 0:\n            i += 1\n        elif arr[i] > 0 and arr[i] % 2 == 0 and (arr[i] not in selected_elements):\n            selected_elements.add(arr[i])\n            if len(selected_elements) == k:\n                break\n    return sum(selected_elements)"], [0.8894398212432861, "    len1 = len(arr1)\n    len2 = len(arr2)\n    min_len = min(len1, len2)\n    new_array = []\n    for i in range(min_len):\n        new_element = arr1[i] + arr2[i]\n        new_array.append(new_element)\n        if new_element > 100:\n            new_array[-1] = 100\n    if len1 > len2:\n        for i in range(min_len, len1):\n            new_element = arr1[i]\n            if new_element > 100:\n                new_element = 100\n            if sum(new_array) + new_element > 1000:\n                break\n            new_array.append(new_element)\n    if len2 > len1:\n        for i in range(min_len, len2):\n            new_element = arr2[i]\n            if new_element > 100:\n                new_element = 100\n            if sum(new_array) + new_element > 1000:\n                break\n            new_array.append(new_element)\n    return new_array"], [0.8879009485244751, "    total = 0\n    for num in arr:\n        if len(str(num)) == 3:\n            total += num\n    return total"], [0.8876810073852539, "    if K > len(arr):\n        return -1\n    sorted_arr = sorted(arr, reverse=True)\n    sum_of_max_digits = sum(sorted_arr[:K])\n    return sum_of_max_digits"], [0.8867008686065674, "    if index <= 2:\n        return arr[index] + sum_of_first_three_elements(arr, index + 1)\n    else:\n        return 0"], [0.8867008686065674, "    if index <= 2:\n        return arr[index] + sum_of_first_three_elements(arr, index + 1)\n    else:\n        return 0"], [0.8834466934204102, "    arr.sort()\n    return arr[0] + arr[1]"]]}
{"task_id": "HumanEval/123", "problem": [[0.9235935211181641, "    collatz = []\n    while n != 1:\n        collatz.append(n)\n        if n % 2 == 0:\n            n = n // 2\n        else:\n            n = 3 * n + 1\n    collatz.append(1)\n    return collatz"], [0.9072116613388062, "    while n != 1:\n        collatz.append(n)\n        if n % 2 == 0:\n            n = n // 2\n        else:\n            n = 3 * n + 1"], [0.9057536125183105, "        if n % 2 == 0:\n            sequence, steps = collatz(n // 2)\n            collatz_dict[n] = ([n] + sequence, steps + 1)\n        else:\n            sequence, steps = collatz(3 * n + 1)\n            collatz_dict[n] = ([n] + sequence, steps + 1)"], [0.9053941965103149, "    if n not in collatz_dict:\n        if n % 2 == 0:\n            sequence, steps = collatz(n // 2)\n            collatz_dict[n] = ([n] + sequence, steps + 1)\n        else:\n            sequence, steps = collatz(3 * n + 1)\n            collatz_dict[n] = ([n] + sequence, steps + 1)\n    return collatz_dict[n]"], [0.9050689339637756, "    if n not in collatz_dict:\n        if n % 2 == 0:\n            sequence, steps = collatz(n // 2)\n            collatz_dict[n] = ([n] + sequence, steps + 1)\n        else:\n            sequence, steps = collatz(3 * n + 1)\n            collatz_dict[n] = ([n] + sequence, steps + 1)"], [0.9023639559745789, "    odd_numbers = []\n    for i in range(1, n + 1):\n        if i % 2 != 0:\n            odd_numbers.append(i)\n    return odd_numbers"], [0.9003139734268188, "    odd_numbers = [num for num in arr if num % 2 != 0]\n    odd_numbers = sort_odd_numbers(odd_numbers)\n    odd_numbers = remove_duplicates(odd_numbers)\n    return odd_numbers"], [0.8992223739624023, "    if not isinstance(n, int):\n        raise TypeError('Input must be an integer.')\n    elif n <= 0:\n        raise ValueError('Input must be a positive integer.')\n    else:\n        sequence = []\n        while n != 1:\n            sequence.append(n)\n            n = n / 2 if n % 2 == 0 else 3 * n + 1\n        sequence.append(1)\n    return sequence"], [0.8989180326461792, "    if not isinstance(n, int):\n        raise TypeError('Input must be an integer.')\n    elif n <= 0:\n        raise ValueError('Input must be a positive integer.')\n    else:\n        sequence = []\n        while n != 1:\n            sequence.append(n)\n            n = n / 2 if n % 2 == 0 else 3 * n + 1\n        sequence.append(1)"], [0.8983014225959778, "    collatz = collatzSequence(n)\n    primes = generatePrimes(max(collatz))\n    collatz = [i for i in collatz if i in primes]\n    collatz.sort()\n    return collatz"]]}
{"task_id": "HumanEval/124", "problem": [[0.9252256155014038, "    month_map = {'jan': 1, 'feb': 2, 'mar': 3, 'apr': 4, 'may': 5, 'jun': 6, 'jul': 7, 'aug': 8, 'sep': 9, 'oct': 10, 'nov': 11, 'dec': 12}\n    month_days_map = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}\n    date = date.strip()\n    separators = ['/', '-', '.']\n    separator = None\n    for sep in separators:\n        if sep in date:\n            separator = sep\n            break\n    if separator is None:\n        return False\n    parts = date.split(separator)\n    if len(parts) != 3:\n        return False\n    if separator == '.':\n        month, day, year = (parts[0], parts[1], parts[2])\n    else:\n        month, day, year = (parts[0], parts[1], parts[2][:4])\n    if month.isdigit():\n        month = int(month)\n    else:\n        month = month_map.get(month.lower())\n    if month is None or month < 1 or month > 12:\n        return False\n    if not year.isdigit() or len(year) != 4:\n        return False\n    year = int(year)\n    if year < 1582 or (year == 1582 and month < 10) or (year == 1582 and month == 10 and (day < 4)):\n        return False\n    if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0):\n        month_days_map[2] = 29\n    if not day.isdigit() or int(day) < 1 or int(day) > month_days_map[month]:\n        return False\n    return True"], [0.9229251146316528, "    date_parts = input_date.split('/')\n    if len(date_parts) != 3:\n        return 'Invalid date'\n    day = int(date_parts[1])\n    month = int(date_parts[0])\n    year = int(date_parts[2])\n    if month < 1 or month > 12:\n        return 'Invalid date'\n    if day < 1 or day > 31:\n        return 'Invalid date'\n    if month in [4, 6, 9, 11] and day > 30:\n        return 'Invalid date'\n    if month == 2:\n        if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:\n            if day > 29:\n                return 'Invalid date'\n        elif day > 28:\n            return 'Invalid date'\n    converted_date = str(day).zfill(2) + '-' + str(month).zfill(2) + '-' + str(year)\n    return converted_date"], [0.9224104881286621, "    try:\n        day, month, year = map(int, date_str.split('/'))\n        if year < 1:\n            return 'Invalid date'\n        if month < 1 or month > 12:\n            return 'Invalid date'\n        if month in [4, 6, 9, 11] and day > 30:\n            return 'Invalid date'\n        if month == 2:\n            if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:\n                if day > 29:\n                    return 'Invalid date'\n            elif day > 28:\n                return 'Invalid date'\n        elif day > 31:\n            return 'Invalid date'\n        return 'Valid date'\n    except ValueError:\n        return 'Invalid date'"], [0.9224104881286621, "    try:\n        day, month, year = map(int, date_str.split('/'))\n        if year < 1:\n            return 'Invalid date'\n        if month < 1 or month > 12:\n            return 'Invalid date'\n        if month in [4, 6, 9, 11] and day > 30:\n            return 'Invalid date'\n        if month == 2:\n            if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:\n                if day > 29:\n                    return 'Invalid date'\n            elif day > 28:\n                return 'Invalid date'\n        elif day > 31:\n            return 'Invalid date'\n        return 'Valid date'\n    except ValueError:\n        return 'Invalid date'"], [0.9210453033447266, "    regex = '^(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-[0-9]{4}$'\n    p = re.compile(regex)\n    if re.search(p, date) == None:\n        return False\n    else:\n        mm, dd, yyyy = map(int, date.split('-'))\n        if is_leap_year(yyyy) and mm == 2 and (dd > 29):\n            return False\n        if not is_leap_year(yyyy) and mm == 2 and (dd > 28):\n            return False\n        if dd > monthrange(yyyy, mm)[1]:\n            return False\n        return True"], [0.9192676544189453, "    if len(date_str) != 10:\n        return False\n    month, day, year = date_str.split('/')\n    try:\n        month = int(month)\n        if month < 1 or month > 12:\n            return False\n    except ValueError:\n        return False\n    try:\n        day = int(day)\n        if day < 1 or day > 31:\n            return False\n    except ValueError:\n        return False\n    try:\n        year = int(year)\n    except ValueError:\n        return False\n    if month == 2 and day == 29:\n        if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0):\n            return True\n        else:\n            return False\n    if month == 2 and day > 28:\n        return False\n    elif month in [4, 6, 9, 11] and day > 30:\n        return False\n    return True"], [0.9183874130249023, "    year, month, day = map(int, date.split('-'))\n    if month < 1 or month > 12:\n        return 'No'\n    if day < 1 or day > 31:\n        return 'No'\n    if month in [4, 6, 9, 11] and day > 30:\n        return 'No'\n    if month == 2:\n        if year % 4 == 0 and year % 100 != 0 or year % 400 == 0:\n            if day > 29:\n                return 'No'\n        elif day > 28:\n            return 'No'\n    return 'Yes'"], [0.9172987937927246, "    month, day, year = input_date.split('/')\n    if not 1 <= int(month) <= 12:\n        return ('Invalid date', False)\n    if not 1 <= int(day) <= 31:\n        return ('Invalid date', False)\n    if not 1000 <= int(year) <= 9999:\n        return ('Invalid date', False)\n    converted_date = f'{day}-{month}-{year}'\n    weekday = calendar.weekday(int(year), int(month), int(day))\n    is_weekday = weekday < 5\n    return (converted_date, is_weekday)"], [0.9169000387191772, "    regex_ = '^(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-[0-9]{4}$'\n    p = re.compile(regex)\n    if re.search(p, date) == None:\n        return False\n    else:\n        mm, dd, yyyy = map(int, date.split('-'))\n        if is_leap_year(yyyy) and mm == 2 and (dd > 29):\n            return False\n        if not is_leap_year(yyyy) and mm == 2 and (dd > 28):\n            return False\n        if dd > monthrange(yyyy, mm)[1]:\n            return False\n        return True"], [0.9143874645233154, "    if re.search(p, date) == None:\n        return False\n    else:\n        mm, dd, yyyy = map(int, date.split('-'))\n        if is_leap_year(yyyy) and mm == 2 and (dd > 29):\n            return False\n        if not is_leap_year(yyyy) and mm == 2 and (dd > 28):\n            return False\n        if dd > monthrange(yyyy, mm)[1]:\n            return False\n        return True"]]}
{"task_id": "HumanEval/125", "problem": [[0.9241569638252258, "    if ' ' in txt or ',' in txt:\n        return [word for word in txt.replace(',', ' ').split()]\n    else:\n        return sum((1 for i in range(len(txt)) if i % 2 and txt[i].islower()))"], [0.9241569638252258, "    if ' ' in txt or ',' in txt:\n        return [word for word in txt.replace(',', ' ').split()]\n    else:\n        return sum((1 for i in range(len(txt)) if i % 2 and txt[i].islower()))"], [0.8986536860466003, "    if ',' in text:\n        return text.split(',')\n    elif ':' in text:\n        return text.split(':')\n    else:\n        return sum((c.islower() and (ord(c) - ord('a')) % 2 for c in text))"], [0.8986536860466003, "    if ',' in text:\n        return text.split(',')\n    elif ':' in text:\n        return text.split(':')\n    else:\n        return sum((c.islower() and (ord(c) - ord('a')) % 2 for c in text))"], [0.8964356184005737, "    if ',' in s:\n        return s.split(',')\n    elif ':' in s:\n        return s.split(':')\n    else:\n        return len([i for i in s if i.islower() and ord(i) % 2 == 1])"], [0.8964356184005737, "    if ',' in s:\n        return s.split(',')\n    elif ':' in s:\n        return s.split(':')\n    else:\n        return len([i for i in s if i.islower() and ord(i) % 2 == 1])"], [0.8956098556518555, "    if ' ' in str:\n        return str.split()\n    elif ';' in str:\n        return str.split(';')\n    else:\n        return sum([(ord(ch) - ord('A')) % 2 == 0 for ch in str if ch.isupper()])"], [0.8956098556518555, "    if ' ' in str:\n        return str.split()\n    elif ';' in str:\n        return str.split(';')\n    else:\n        return sum([(ord(ch) - ord('A')) % 2 == 0 for ch in str if ch.isupper()])"], [0.8946389555931091, "    if ',' in str:\n        return str.split(',')\n    if ';' in str:\n        return str.split(';')\n    if str.isupper():\n        return sum([1 for c in str if (ord(c) - ord('A')) % 2 == 0])\n    elif ' ' in str:\n        return str.split()\n    counts = {'upper': 0, 'lower': 0, 'digits': 0, 'others': 0}\n    for c in str:\n        if c.isupper():\n            counts['upper'] += 1\n        elif c.islower():\n            counts['lower'] += 1\n        elif c.isdigit():\n            counts['digits'] += 1\n        else:\n            counts['others'] += 1\n    return counts"], [0.8935330510139465, "    count = 0\n    text_list = text.split()\n    for word in text_list:\n        count = count + 1\n    return count"]]}
{"task_id": "HumanEval/126", "problem": [[0.925591230392456, "    if not lst:\n        return True\n    if lst[0] > lst[1]:\n        return False\n    return is_sorted(lst[1:])"], [0.9255355596542358, "    if len(lst) <= 1:\n        return True\n    mid = len(lst) // 2\n    left = lst[:mid]\n    right = lst[mid:]\n    return is_sorted(left) and is_sorted(right) and (left[-1] <= right[0])"], [0.9247540235519409, "    if not lst or len(lst) == 1:\n        print('List needs at least two elements for comparison.')\n        return False\n    try:\n        for i in range(len(lst) - 1):\n            if not isinstance(lst[i], (int, float)) or not isinstance(lst[i + 1], (int, float)):\n                print('Non-numeric values found in list.')\n                return False\n            if lst[i] >= lst[i + 1]:\n                return False\n        return True\n    except Exception as e:\n        print(f'Unexpected error: {e}')\n        return False"], [0.924433708190918, "        for i in range(len(lst) - 1):\n            if not isinstance(lst[i], (int, float)) or not isinstance(lst[i + 1], (int, float)):\n                print('Non-numeric values found in list.')\n                return False\n            if lst[i] >= lst[i + 1]:\n                return False"], [0.9232003092765808, "    if not lst:\n        return True\n    if not all((isinstance(i, int) for i in lst)):\n        raise ValueError('List must contain only integers.')\n    lst.sort()\n    for i in range(1, len(lst)):\n        if lst[i] == lst[i - 1]:\n            return False\n    return True"], [0.9231412410736084, "    is_sorted = True\n    for i in range(len(arr) - 1):\n        if arr[i] > arr[i + 1]:\n            is_sorted = False\n            break\n    return is_sorted"], [0.9220023155212402, "    if not lst:\n        raise ValueError('List is empty.')\n    if len(lst) == 1:\n        raise ValueError('List contains only one element.')\n    for i in range(len(lst) - 1):\n        if not (isinstance(lst[i], int) or isinstance(lst[i], float)) or not (isinstance(lst[i + 1], int) or isinstance(lst[i + 1], float)):\n            raise ValueError('List contains non-numeric values.')\n        if lst[i] <= lst[i + 1]:\n            return False\n    return True"], [0.9218246340751648, "    if not lst:\n        print('List is empty.')\n        return False\n    if not all((isinstance(x, (int, float)) for x in lst)):\n        print('All elements in the list are not numerical values.')\n        return False\n    for i in range(len(lst) - 1):\n        if lst[i] > lst[i + 1]:\n            return False\n    return True"], [0.9218223690986633, "    if not lst:\n        print('List is empty.')\n        return False\n    if not all((isinstance(x, (int, float)) for x in lst)):\n        print('All elements in the list are not numerical values.')\n        return False\n    for i in range(len(lst) - 1):\n        if lst[i] > lst[i + 1]:\n            return False\n    return True"], [0.9213091135025024, "    if not isinstance(lst, list):\n        raise ValueError('The input must be a list.')\n    if len(lst) < 1:\n        raise ValueError('The list is empty.')\n    if len(lst) < 2:\n        raise ValueError('The list must contain more than one element.')\n    if not all((isinstance(item, (int, float)) for item in lst)):\n        raise ValueError('All elements in the list should be numeric.')\n    for i in range(len(lst) - 1):\n        if lst[i] >= lst[i + 1]:\n            return False\n    return True"]]}
{"task_id": "HumanEval/127", "problem": [[0.9030736684799194, "    elif all((sieve[i] for i in lst1)):\n        return 'YES'\n    else:\n        return 'NO'"], [0.9030609726905823, "    elif all((sieve[i] for i in lst1)):\n        return 'YES'\n    else:\n        return 'NO'"], [0.8990699052810669, "    if a < 0 or b < 0:\n        return 'Invalid input. Please enter non-negative values.'\n    elif a > b:\n        return 'Invalid input. The start number should be less than or equal to the end number.'\n    primes = []\n    for num in range(a, b + 1):\n        if num > 1:\n            for i in range(2, num):\n                if num % i == 0:\n                    break\n            else:\n                primes.append(num)\n    return (primes, len(primes))"], [0.8967109322547913, "    if start_num > end_num:\n        return 'Error: start_num is greater than end_num'\n    start_num = max(start_num, -20)\n    end_num = min(end_num, 100)\n    count = 0\n    for num in range(start_num, end_num + 1):\n        if num > 1:\n            is_prime = True\n            for i in range(2, int(num ** 0.5) + 1):\n                if num % i == 0:\n                    is_prime = False\n                    break\n            if is_prime:\n                count += 1\n    return count"], [0.8948162794113159, "    if prime_numbers:\n        print('Prime numbers between', start, 'and', end, 'are:')\n        for prime in prime_numbers:\n            print(prime)\n    else:\n        print('There are no prime numbers between', start, 'and', end)"], [0.894804835319519, "    if prime_numbers:\n        print('Prime numbers between', start, 'and', end, 'are:')\n        for prime in prime_numbers:\n            print(prime)\n    else:\n        print('There are no prime numbers between', start, 'and', end)"], [0.8944292068481445, "    assert is_prime(4) == 'no'\n    assert is_prime(3) == 'yes'\n    assert is_prime(8) == 'no'"], [0.8935296535491943, "    max_limit = max(end_1, end_2)\n    primes = sieve_eratosthenes(max_limit)\n    return [prime for prime in primes if max(start_1, start_2) <= prime <= min(end_1, end_2)]"], [0.8933018445968628, "    if not (isinstance(x, int) and isinstance(y, int) and (x > 0) and (y > 0)):\n        return 'x and y must be positive integers'\n    elif x >= y:\n        return 'x must be less than y'\n    nums = list(range(x, y + 1))\n    for num in nums:\n        is_prime = True\n        for i in range(2, num):\n            if num % i == 0:\n                is_prime = False\n                break\n        if is_prime:\n            print(num)"], [0.8930823802947998, "    if change:\n        return 'YES' if sum(lst1) == sum1 and sum(lst2) == sum2 else 'NO'\n    elif all((sieve[i] for i in lst1)):\n        return 'YES'\n    else:\n        return 'NO'"]]}
{"task_id": "HumanEval/128", "problem": [[0.9400964975357056, "    if not arr or 0 in arr:\n        return None\n    distinct_arr = list(set(arr))\n    signs_prod = 1\n    for num in distinct_arr:\n        signs_prod *= 1 if num > 0 else -1\n    sum_abs = sum((abs(num) for num in distinct_arr))\n    return signs_prod * sum_abs"], [0.9387320280075073, "    if len(arr) == 0 or 0 in arr:\n        return None\n    arr = list(set(arr))\n    prod = 1\n    sgn_prod = 1\n    for num in arr:\n        prod *= abs(num)\n        sgn_prod *= 1 if num > 0 else -1\n    return prod * sgn_prod"], [0.9375760555267334, "    if not arr or len(arr) > 500 or any((abs(x) > 500 for x in arr)):\n        return None\n    arr = [x for x in arr if x != 0]\n    unique_arr = list(set(arr))\n    sign_product = 1\n    sum_ = 0\n    for x in unique_arr:\n        sign_product *= 1 if x > 0 else -1\n        sum_ += abs(x)\n    return sign_product * sum_"], [0.9356793761253357, "    if not arr:\n        return None\n    arr = list(set([i for i in arr if i != 0]))\n    if not arr:\n        return None\n    sign_product = 1\n    abs_val_sum = 0\n    for i in arr:\n        sign_product *= -1 if i < 0 else 1\n        abs_val_sum += abs(i)\n    return sign_product * abs_val_sum"], [0.9351511001586914, "    if len(arr) == 0 or (len(arr) == 1 and arr[0] == 0):\n        return None\n    result = 0\n    total_sign = 1\n    seen = set()\n    for num in arr:\n        if num != 0:\n            sign = 1 if num > 0 else -1\n            total_sign *= sign\n            seen.add(abs(num))\n    result = total_sign * sum(seen)\n    return result"], [0.9339354038238525, "    if arr is None or len(arr) == 0:\n        return None\n    distinct_elements = set(filter(None, arr))\n    if len(distinct_elements) == 0:\n        return None\n    sum_of_products = 0\n    for element in distinct_elements:\n        product_of_tags = arr.count(element) if element > 0 else -arr.count(element)\n        sum_of_products += abs(element) * product_of_tags\n    return sum_of_products"], [0.9323292970657349, "    unique_primes = set()\n    for i in arr:\n        if is_prime(abs(i)):\n            unique_primes.add(i)\n    if not unique_primes:\n        return None\n    summed_magnitudes = sum((abs(x) for x in unique_primes))\n    multiplied_signs = sign(sum((sign(x) for x in unique_primes)))\n    return summed_magnitudes * multiplied_signs"], [0.9289535284042358, "    if not arr:\n        return None\n    distinct_signs_product = 1\n    distinct_absolute_sums = 0\n    distinct_elements = set()\n    for n in arr:\n        if n == 0:\n            return None\n        absolute_value = abs(n)\n        if absolute_value in distinct_elements:\n            continue\n        distinct_elements.add(absolute_value)\n        sign = n / absolute_value\n        distinct_signs_product *= sign\n        distinct_absolute_sums += absolute_value\n    return distinct_signs_product * distinct_absolute_sums"], [0.9270734786987305, "    if not arr:\n        return None\n    pos = {x for x in arr if x > 0}\n    neg = {x for x in arr if x < 0}\n    total_sum = sum(pos) + sum(neg)\n    total_mult = len(pos) * len(neg) if neg else len(pos)\n    return total_sum * total_mult"], [0.9251378774642944, "    if not arr:\n        return None\n    val, sign = (0, 1)\n    for num in arr:\n        if num == 0:\n            return None\n        else:\n            val += abs(num) * (1 if num > 0 else -1)\n    return val"]]}
{"task_id": "HumanEval/129", "problem": [[0.935864269733429, "    n = len(grid)\n    pq = PriorityQueue()\n    for i in range(n):\n        for j in range(n):\n            pq.put((grid[i][j], (i, j)))\n    smallest_k_paths = []\n    for _ in range(k):\n        _, (i, j) = pq.get()\n        visited = [[False] * n for _ in range(n)]\n        visited[i][j] = True\n        q = deque([(i, j, [grid[i][j]])])\n        while q:\n            x, y, path = q.popleft()\n            if len(path) == k:\n                smallest_k_paths.append(sorted(path))\n                break\n            for dx, dy in directions:\n                nx, ny = (x + dx, y + dy)\n                if isValid(nx, ny, n) and (not visited[nx][ny]):\n                    visited[nx][ny] = True\n                    q.append((nx, ny, path + [grid[nx][ny]]))\n    return smallest_k_paths"], [0.935860276222229, "    n = len(grid)\n    pq = PriorityQueue()\n    for i in range(n):\n        for j in range(n):\n            pq.put((grid[i][j], (i, j)))\n    smallest_k_paths = []\n    for _ in range(k):\n        _, (i, j) = pq.get()\n        visited = [[False] * n for _ in range(n)]\n        visited[i][j] = True\n        q = deque([(i, j, [grid[i][j]])])\n        while q:\n            x, y, path = q.popleft()\n            if len(path) == k:\n                smallest_k_paths.append(sorted(path))\n                break\n            for dx, dy in directions:\n                nx, ny = (x + dx, y + dy)\n                if isValid(nx, ny, n) and (not visited[nx][ny]):\n                    visited[nx][ny] = True\n                    q.append((nx, ny, path + [grid[nx][ny]]))\n    return smallest_k_paths"], [0.929392397403717, "    N = len(grid)\n    minheap = [(grid[0][0], 0, 0, [grid[0][0]])]\n    visited = set([(0, 0)])\n    while minheap:\n        cost, i, j, path = heapq.heappop(minheap)\n        if len(path) == k:\n            return path[:k]\n        for x, y in [(i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)]:\n            if 0 <= x < N and 0 <= y < N and ((x, y) not in visited):\n                visited.add((x, y))\n                new_cost = cost + grid[x][y]\n                new_path = path + [grid[x][y]]\n                heapq.heappush(minheap, (new_cost, x, y, new_path))"], [0.9290235638618469, "    n = len(grid)\n    directions = [(0, 1), (0, -1), (1, 0), (-1, 0), (-1, -1), (-1, 1), (1, -1), (1, 1)]\n    heap = [(grid[0][0], 0, 0)]\n    visit = [[0 for _ in range(n)] for _ in range(n)]\n    visit[0][0] = 1\n    cell_values = []\n    while heap:\n        value, x, y = heapq.heappop(heap)\n        cell_values.append(value)\n        if len(cell_values) == k:\n            break\n        for dx, dy in directions:\n            nx, ny = (x + dx, y + dy)\n            if 0 <= nx < n and 0 <= ny < n and (not visit[nx][ny]):\n                visit[nx][ny] = 1\n                heapq.heappush(heap, (grid[nx][ny], nx, ny))\n    return sorted(cell_values[:k])"], [0.928361177444458, "    if not grid or len(grid) == 0:\n        return []\n    N = len(grid)\n    M = len(grid[0])\n    if k < N * M:\n        return []\n    dp = [[0 for _ in range(N)] for __ in range(M)]\n    dp[0][0] = grid[0][0]\n    for i in range(1, N):\n        dp[i][0] = dp[i - 1][0] + grid[i][0]\n    for i in range(1, M):\n        dp[0][i] = dp[0][i - 1] + grid[0][i]\n    for i in range(1, M):\n        for j in range(1, N):\n            dp[i][j] = min(dp[i - 1][j], dp[i][j - 1]) + grid[i][j]\n    path = []\n    i, j = (M - 1, N - 1)\n    while len(path) < k:\n        path.append(grid[i][j])\n        if i > 0 and j > 0:\n            if dp[i - 1][j] < dp[i][j - 1]:\n                i -= 1\n            else:\n                j -= 1\n        elif i > 0:\n            i -= 1\n        elif j > 0:\n            j -= 1\n        else:\n            break\n    return sorted(path)"], [0.9275223016738892, "    pq, path, visited, result = ([], [], set(), [])\n    n = len(grid)\n    pq.append((grid[0][0], 0, 0))\n    while pq:\n        val, x, y = heapq.heappop(pq)\n        if (x, y) not in visited:\n            visited.add((x, y))\n            path.append(val)\n            if len(path) == k:\n                return path\n            for dx, dy in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n                new_x, new_y = (x + dx, y + dy)\n                if 0 <= new_x < n and 0 <= new_y < n:\n                    heapq.heappush(pq, (grid[new_x][new_y], new_x, new_y))\n    return path"], [0.9275161623954773, "    pq, path, visited, result = ([], [], set(), [])\n    n = len(grid)\n    pq.append((grid[0][0], 0, 0))\n    while pq:\n        val, x, y = heapq.heappop(pq)\n        if (x, y) not in visited:\n            visited.add((x, y))\n            path.append(val)\n            if len(path) == k:\n                return path\n            for dx, dy in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n                new_x, new_y = (x + dx, y + dy)\n                if 0 <= new_x < n and 0 <= new_y < n:\n                    heapq.heappush(pq, (grid[new_x][new_y], new_x, new_y))\n    return path"], [0.9268295764923096, "    N = len(grid)\n    direction = [(0, 1), (0, -1), (1, 0), (-1, 0)]\n    visited = [[0 for _ in range(N)] for _ in range(N)]\n    ret = []\n    for i in range(N):\n        for j in range(N):\n            heap = [(grid[i][j], i, j)]\n            min_val = [grid[i][j]]\n            while heap and len(min_val) < K:\n                cost, x, y = heapq.heappop(heap)\n                if visited[x][y] == 1:\n                    continue\n                visited[x][y] = 1\n                for dx, dy in direction:\n                    nx, ny = (x + dx, y + dy)\n                    if 0 <= nx < N and 0 <= ny < N and (visited[nx][ny] == 0):\n                        min_val.append(grid[nx][ny])\n                        heapq.heappush(heap, (grid[nx][ny], nx, ny))\n            visited = [[0 for _ in range(N)] for _ in range(N)]\n            min_val.sort()\n            ret.append(min_val[:K])\n    return ret"], [0.9266260862350464, "    N = len(grid)\n    distances = [[sys.maxsize for _ in range(N)] for _ in range(N)]\n    for blocked_cell in blocked_cells:\n        distances[blocked_cell[0]][blocked_cell[1]] = -1\n    for i in range(N):\n        for j in range(N):\n            if distances[i][j] != -1:\n                distances[i][j] = 0\n                queue = Queue()\n                queue.put((i, j))\n    directions = [(0, -1), (0, 1), (-1, 0), (1, 0)]\n    while not queue.empty():\n        cur_i, cur_j = queue.get()\n        for direction in directions:\n            new_i, new_j = (cur_i + direction[0], cur_j + direction[1])\n            if 0 <= new_i < N and 0 <= new_j < N and (distances[new_i][new_j] != -1):\n                new_distance = distances[cur_i][cur_j] + 1\n                if new_distance < distances[new_i][new_j]:\n                    distances[new_i][new_j] = new_distance\n                    queue.put((new_i, new_j))\n    path = []\n    for i in range(N):\n        for j in range(N):\n            if distances[i][j] == k:\n                path.append(grid[i][j])\n    if not path:\n        return -1\n    path.sort()\n    return path"], [0.9261231422424316, "    while pq:\n        val, x, y = heapq.heappop(pq)\n        if (x, y) not in visited:\n            visited.add((x, y))\n            path.append(val)\n            if len(path) == k:\n                return path\n            for dx, dy in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n                new_x, new_y = (x + dx, y + dy)\n                if 0 <= new_x < n and 0 <= new_y < n:\n                    heapq.heappush(pq, (grid[new_x][new_y], new_x, new_y))"]]}
{"task_id": "HumanEval/130", "problem": [[0.9249154329299927, "    for i in range(3, n + 1):\n        trib[i] = trib[i - 3] + trib[i - 2] + trib[i - 1]"], [0.9238795042037964, "    if n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    trib = [0, 1, 1] + [0] * (n - 2)\n    for i in range(3, n + 1):\n        trib[i] = trib[i - 1] + trib[i - 2] + trib[i - 3]\n    return trib[n]"], [0.923575758934021, "    for i in range(3, n + 1):\n        trib[i] = trib[i - 1] + trib[i - 2] + trib[i - 3]"], [0.9234954714775085, "    if n in memo:\n        return memo[n]\n    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)"], [0.9234778881072998, "    if n in memo:\n        return memo[n]\n    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)"], [0.9226125478744507, "    sequence = []\n    if n < 0:\n        return sequence\n    if n >= 0:\n        sequence.append(3)\n    if n >= 2:\n        sequence.append(2)\n    if n >= 3:\n        sequence.append(sequence[-2] + sequence[-1] + 1)\n    for i in range(4, n + 1):\n        if i % 2 == 0:\n            sequence.append(1 + i // 2)\n        else:\n            sequence.append(sequence[-2] + sequence[-1] + sequence[-3])\n    return sequence"], [0.9223664402961731, "    if n in memo:\n        return memo[n]\n    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)\n    memo[n] = result\n    return result"], [0.922335684299469, "    if n in memo:\n        return memo[n]\n    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)\n    memo[n] = result\n    return result"], [0.9207459688186646, "    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)"], [0.9207361936569214, "    elif n == 0:\n        return 0\n    elif n == 1 or n == 2:\n        return 1\n    elif n < 0:\n        result = tribonacci(n + 3, memo) - tribonacci(n + 2, memo) - tribonacci(n + 1, memo)\n    else:\n        result = tribonacci(n - 1, memo) + tribonacci(n - 2, memo) + tribonacci(n - 3, memo)"]]}
{"task_id": "HumanEval/131", "problem": [[0.9132908582687378, "    if not numbers:\n        return round(product)\n    elif 10 < numbers[0] < 20 and numbers[0] % 2 != 0:\n        return product_of_odd_numbers(numbers[1:], product * numbers[0])\n    else:\n        return product_of_odd_numbers(numbers[1:], product)"], [0.9132908582687378, "    if not numbers:\n        return round(product)\n    elif 10 < numbers[0] < 20 and numbers[0] % 2 != 0:\n        return product_of_odd_numbers(numbers[1:], product * numbers[0])\n    else:\n        return product_of_odd_numbers(numbers[1:], product)"], [0.9111405611038208, "    elif 10 < numbers[0] < 20 and numbers[0] % 2 != 0:\n        return product_of_odd_numbers(numbers[1:], product * numbers[0])\n    else:\n        return product_of_odd_numbers(numbers[1:], product)"], [0.9067743420600891, "    n = [int(i) for i in str(n)]\n    odd = [i for i in n if i % 2 != 0]\n    even = [i for i in n if i % 2 == 0]\n    if len(odd) == 0:\n        half = len(even) // 2\n        product = 1\n        for num in even[:half]:\n            product *= num\n        return product\n    elif len(even) == 0:\n        half = len(odd) // 2\n        return sum(odd[:half])\n    else:\n        product = 1\n        for num in odd:\n            product *= num\n        return product + sum(even)"], [0.9067422747612, "    n = [int(i) for i in str(n)]\n    evens = [i for i in n if i % 2 == 0]\n    odds = [i for i in n if i % 2 != 0]\n    if len(odds) == 0:\n        half = len(evens) // 2\n        product = 1\n        for i in range(half):\n            product *= evens[i]\n        return product\n    elif len(evens) == 0:\n        half = len(odds) // 2\n        return sum(odds[:half])\n    else:\n        return sum(evens) + eval('*'.join((str(i) for i in odds)))"], [0.9045974612236023, "    s = str(n)\n    evens = [int(d) for d in s if int(d) % 2 == 0]\n    odds = [int(d) for d in s if int(d) % 2 == 1]\n    if len(evens) == len(s):\n        half = len(evens) // 2\n        result = 1\n        for i in range(half):\n            result *= evens[i]\n        return result\n    elif len(odds) == len(s):\n        half = len(odds) // 2\n        return sum(odds[:half])\n    else:\n        return sum(evens) * prod(odds)"]]}
{"task_id": "HumanEval/132", "problem": [[0.9089632034301758, "        elif char == '[' and nestedCount == 0:\n            count += 1\n        elif char == ']' and nestedCount == 0:\n            count -= 1\n        elif char == '[' and nestedCount > 0:\n            nestedCount += 1\n        elif char == ']' and nestedCount > 0:\n            nestedCount -= 1"], [0.9070448875427246, "        elif char == '[':\n            is_nested = True\n        elif char == ']':\n            if is_nested:\n                count -= 1\n                is_nested = False"], [0.9061774611473083, "        elif char == ']' and nestedCount == 0:\n            count -= 1\n        elif char == '[' and nestedCount > 0:\n            nestedCount += 1\n        elif char == ']' and nestedCount > 0:\n            nestedCount -= 1"], [0.9060753583908081, "    open_bracket = set('{[(')\n    close_bracket = set('}])')\n    matching_bracket = {('}', '{'), (')', '('), (']', '[')}\n    stack = []\n    for i in string:\n        if i in open_bracket:\n            stack.append(i)\n        elif i in close_bracket:\n            if len(stack) == 0:\n                return False\n            elif (i, stack[-1]) not in matching_bracket:\n                return False\n            stack.pop()\n    if len(stack) == 0:\n        return True\n    else:\n        return False"], [0.9041455388069153, "        elif char == '[' and nestedCount > 0:\n            nestedCount += 1\n        elif char == ']' and nestedCount > 0:\n            nestedCount -= 1"], [0.9035516977310181, "    for char in string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if len(stack) == 0 or stack[-1] != bracket_pairs[char]:\n                return False\n            stack.pop()"], [0.9035272598266602, "    open_brace_stack = []\n    for char in string:\n        if char in ('{', '(', '['):\n            open_brace_stack.append(char)\n        elif char in ('}', ')', ']'):\n            if len(open_brace_stack) == 0:\n                return False\n            elif char == '}' and open_brace_stack[-1] == '{' or (char == ']' and open_brace_stack[-1] == '[') or (char == ')' and open_brace_stack[-1] == '('):\n                open_brace_stack.pop()\n            else:\n                return False\n    if len(open_brace_stack) > 0:\n        return False\n    return True"], [0.903236448764801, "    for char in string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if not stack:\n                return False\n            opening_bracket = stack.pop()\n            if opening_brackets.index(opening_bracket) != closing_brackets.index(char):\n                return False"], [0.9025713801383972, "    opening_brackets = {'(', '[', '{'}\n    closing_brackets = {')', ']', '}'}\n    bracket_map = {'(': ')', '[': ']', '{': '}'}\n    stack = []\n    for char in string:\n        if char in opening_brackets:\n            stack.append(char)\n        elif char in closing_brackets:\n            if len(stack) == 0 or bracket_map[stack[-1]] != char:\n                return False\n            stack.pop()\n    return len(stack) == 0"], [0.9025671482086182, "    stack = []\n    for i in bracket_list:\n        if i == '[' or i == '{':\n            stack.append(i)\n        elif i == ']':\n            if len(stack) != 0 and stack[-1] == '[':\n                stack.pop()\n            else:\n                return False\n        elif i == '}':\n            if len(stack) != 0 and stack[-1] == '{':\n                stack.pop()\n            else:\n                return False\n        elif i == ')':\n            if len(stack) != 0 and stack[-1] == '(':\n                stack.pop()\n            else:\n                return False\n    if len(stack) == 0:\n        return True\n    else:\n        return False"]]}
{"task_id": "HumanEval/133", "problem": [[0.9241422414779663, "    squared_list = []\n    for i in lst:\n        squared_list.append(i * i)\n    return squared_list"], [0.9208261966705322, "    sum = 0\n    for element in lst:\n        sum += element ** 2\n    return sum"], [0.9189855456352234, "    if idx < len(lst):\n        return lst[idx] ** 2 + recursive_sum_of_squares(lst, idx + 1)\n    else:\n        return 0"], [0.9189855456352234, "    if idx < len(lst):\n        return lst[idx] ** 2 + recursive_sum_of_squares(lst, idx + 1)\n    else:\n        return 0"], [0.9166054725646973, "    squares = []\n    for n in lst:\n        squares.append(n ** 2)\n    return squares"], [0.9158025979995728, "    return sum([num ** 2 for num in lst])"], [0.9158010482788086, "    return sum([num ** 2 for num in lst])"], [0.9157797694206238, "    return sum([num ** 2 for num in lst])"], [0.9147270321846008, "    return sum(map(lambda x: math.ceil(abs(x)) ** 2, lst))"], [0.9145387411117554, "    for i in lst:\n        squared_list.append(i * i)"]]}
{"task_id": "HumanEval/134", "problem": [[0.9002631306648254, "    processed = ''.join((c for c in txt if c.isalpha()))\n    if len(processed) < 3:\n        return 'There are less than three alphabetic characters in the string.'\n    return processed[-3]"], [0.8943980932235718, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    last_char = word[-1].lower()\n    return last_char in vowels"], [0.8928314447402954, "    words = sentence.split()\n    last_word = words[-1]\n    return last_word"], [0.8911231756210327, "    last_char = text[-1].lower()\n    if last_char == 'z':\n        return 'a'\n    elif not last_char.isalpha():\n        return 'Please input a string ending with a alphabet.'\n    else:\n        return chr(ord(last_char) + 1)"], [0.8901891708374023, "            if len(word) > 1 and (not word.isalpha()):\n                last_char = word[-1]\n                if not last_char.isalnum():\n                    punctuation = last_char\n                    word = word[:-1]"], [0.8884354829788208, "    j = len(input_string)\n    for char in input_string:\n        j -= 1\n    if j == 0 and input_string[-1].isdigit():\n        print('Last character was a digit')\n    else:\n        print('Last character was not a digit')"], [0.886505126953125, "    string = string.rstrip()\n    if len(string) > 0:\n        return string[-1]\n    else:\n        return 'Error: No non-space character found'"], [0.8863300085067749, "    if len(string) > 0:\n        return string[-1]\n    else:\n        return 'Error: No non-space character found'"], [0.8861998915672302, "    word = ''.join(filter(str.isalnum, word)).lower()\n    if len(word) <= 1:\n        return True\n    elif word[0] != word[-1]:\n        return False\n    else:\n        return is_palindrome(word[1:-1])"], [0.8856022357940674, "    word = ''.join((e for e in word if e.isalnum())).lower()\n    if len(word) <= 1:\n        return True\n    elif word[0] == word[-1]:\n        return palindrome_check(word[1:-1])\n    else:\n        return False"]]}
{"task_id": "HumanEval/135", "problem": [[0.9048401713371277, "    for i in range(1, len(arr)):\n        if arr[i] < arr[i - 1]:\n            last_checked_index = i - 1\n            break"], [0.9025793075561523, "    pairs = zip(arr, arr[1:])\n    ascending = all((a <= b for a, b in pairs))\n    if ascending:\n        return True\n    else:\n        for i, (a, b) in enumerate(zip(arr, arr[1:])):\n            if a > b:\n                return (False, i + 1)"], [0.9020427465438843, "    for i in range(len(arr)):\n        if arr[i] > value:\n            return i\n    return -1"], [0.9012589454650879, "    for i in range(len(arr) - 1):\n        if arr[i] < arr[i + 1]:\n            misplaced = arr[i + 1]\n            misplaced_idx = i + 1\n            break"], [0.9005457758903503, "    for j in range(len(arr)):\n        new_arr = arr[j:] + arr[:j]\n        if is_sorted(new_arr):\n            return j"], [0.8991960287094116, "    if len(arr) == 0:\n        return -1\n    max_val = arr[0]\n    max_index = 0\n    for i in range(1, len(arr)):\n        if arr[i] > max_val:\n            max_val = arr[i]\n            max_index = i\n        elif arr[i] == max_val:\n            if i < max_index:\n                max_index = i\n    return max_index"], [0.8991130590438843, "    nums.sort(reverse=True)\n    for i, num in enumerate(nums):\n        if num <= i:\n            return i\n    return -1"], [0.8990725874900818, "    if len(arr) == 0:\n        return 0\n    for j in range(len(arr)):\n        new_arr = arr[j:] + arr[:j]\n        if is_sorted(new_arr):\n            return j\n    return -1"], [0.8988988399505615, "    n = len(arr1)\n    dp = [float('inf')] * n\n    for a in arr2:\n        new_dp = [float('inf')] * n\n        p = 0\n        for i in range(n):\n            if a < arr1[i]:\n                new_dp[i] = p\n            if i > 0 and dp[i - 1] < p:\n                p = dp[i - 1]\n            if arr1[i] > arr1[i + 1]:\n                return -1\n        dp = new_dp\n    return dp[-1]"], [0.8982211351394653, "    m = -1\n    for i in range(len(a)):\n        if a[i] > i:\n            m = a[i]\n            break\n    return m"]]}
{"task_id": "HumanEval/136", "problem": [[0.9228713512420654, "    if not lst:\n        return (None, None, None, None)\n    all_negative = list(filter(lambda x: x < 0, lst))\n    all_non_negative = list(filter(lambda x: x >= 0, lst))\n    negative_even = [i for i in all_negative if i % 2 == 0]\n    negative_odd = [i for i in all_negative if i % 2 != 0]\n    non_negative_even = [i for i in all_non_negative if i % 2 == 0]\n    non_negative_odd = [i for i in all_non_negative if i % 2 != 0]\n    a = max(negative_even) if negative_even else None\n    b = min(non_negative_even) if non_negative_even else None\n    c = max(negative_odd) if negative_odd else None\n    d = min(non_negative_odd) if non_negative_odd else None\n    return (a, b, c, d)"], [0.9228613376617432, "    if not lst:\n        return (None, None, None, None)\n    all_negative = list(filter(lambda x: x < 0, lst))\n    all_non_negative = list(filter(lambda x: x >= 0, lst))\n    negative_even = [i for i in all_negative if i % 2 == 0]\n    negative_odd = [i for i in all_negative if i % 2 != 0]\n    non_negative_even = [i for i in all_non_negative if i % 2 == 0]\n    non_negative_odd = [i for i in all_non_negative if i % 2 != 0]\n    a = max(negative_even) if negative_even else None\n    b = min(non_negative_even) if non_negative_even else None\n    c = max(negative_odd) if negative_odd else None\n    d = min(non_negative_odd) if non_negative_odd else None\n    return (a, b, c, d)"], [0.9228252172470093, "    max_neg_even = max_neg_odd = min_non_neg_even = min_non_neg_odd = None\n    for num in lst:\n        if num % 2 == 0:\n            if num >= 0:\n                if min_non_neg_even is None or num < min_non_neg_even:\n                    min_non_neg_even = num\n            elif max_neg_even is None or num > max_neg_even:\n                max_neg_even = num\n        elif num >= 0:\n            if min_non_neg_odd is None or num < min_non_neg_odd:\n                min_non_neg_odd = num\n        elif max_neg_odd is None or num > max_neg_odd:\n            max_neg_odd = num\n    return (max_neg_even, min_non_neg_even, max_neg_odd, min_non_neg_odd)"], [0.9203234910964966, "    highest_neg_even = highest_non_neg_even = smallest_neg_even = smallest_non_neg_even = smallest_neg_odd = highest_non_neg_odd = None\n    for num in lst:\n        if num % 2 == 0:\n            if num < 0:\n                if highest_neg_even is None or highest_neg_even < num:\n                    highest_neg_even = num\n                if smallest_neg_even is None or smallest_neg_even > num:\n                    smallest_neg_even = num\n            else:\n                if highest_non_neg_even is None or highest_non_neg_even < num:\n                    highest_non_neg_even = num\n                if smallest_non_neg_even is None or smallest_non_neg_even > num:\n                    smallest_non_neg_even = num\n        elif num < 0:\n            if smallest_neg_odd is None or smallest_neg_odd > num:\n                smallest_neg_odd = num\n        elif highest_non_neg_odd is None or highest_non_neg_odd < num:\n            highest_non_neg_odd = num\n    return (highest_neg_even, highest_non_neg_even, smallest_neg_even, smallest_non_neg_even, smallest_neg_odd, highest_non_neg_odd)"], [0.919914960861206, "    highest_neg_even = smallest_neg_even = highest_non_neg_even = smallest_non_neg_even = smallest_neg_odd = highest_non_neg_odd = None\n    for num in lst:\n        if num % 2 == 0:\n            if num < 0:\n                if highest_neg_even is None or highest_neg_even < num:\n                    highest_neg_even = num\n                if smallest_neg_even is None or smallest_neg_even > num:\n                    smallest_neg_even = num\n            else:\n                if highest_non_neg_even is None or highest_non_neg_even < num:\n                    highest_non_neg_even = num\n                if smallest_non_neg_even is None or smallest_non_neg_even > num:\n                    smallest_non_neg_even = num\n        elif num < 0:\n            if smallest_neg_odd is None or smallest_neg_odd > num:\n                smallest_neg_odd = num\n        elif highest_non_neg_odd is None or highest_non_neg_odd < num:\n            highest_non_neg_odd = num\n    return (highest_neg_even, highest_non_neg_even, smallest_neg_even, smallest_non_neg_even, smallest_neg_odd, highest_non_neg_odd)"], [0.9183312654495239, "    neg = sorted([n for n in lst if n < 0], reverse=True)[0] if any((n < 0 for n in lst)) else None\n    pos = sorted([n for n in lst if n > 0])[0] if any((n > 0 for n in lst)) else None\n    return [neg, pos]"], [0.9176356792449951, "    negative_evens = [x for x in lst if x < 0 and x % 2 == 0]\n    non_negative_evens = [x for x in lst if x >= 0 and x % 2 == 0]\n    negative_odds = [x for x in lst if x < 0 and x % 2 != 0]\n    non_negative_odds = [x for x in lst if x >= 0 and x % 2 != 0]\n    a = max(negative_evens) if negative_evens else None\n    b = min(non_negative_evens) if non_negative_evens else None\n    c = max(negative_odds) if negative_odds else None\n    d = min(non_negative_odds) if non_negative_odds else None\n    return (a, b, c, d)"], [0.9143264889717102, "    for num in lst:\n        if num % 2 == 0:\n            if num < 0:\n                if highest_neg_even is None or highest_neg_even < num:\n                    highest_neg_even = num\n                if smallest_neg_even is None or smallest_neg_even > num:\n                    smallest_neg_even = num\n            else:\n                if highest_non_neg_even is None or highest_non_neg_even < num:\n                    highest_non_neg_even = num\n                if smallest_non_neg_even is None or smallest_non_neg_even > num:\n                    smallest_non_neg_even = num\n        elif num < 0:\n            if smallest_neg_odd is None or smallest_neg_odd > num:\n                smallest_neg_odd = num\n        elif highest_non_neg_odd is None or highest_non_neg_odd < num:\n            highest_non_neg_odd = num"], [0.9143187999725342, "    for num in lst:\n        if num % 2 == 0:\n            if num < 0:\n                if highest_neg_even is None or highest_neg_even < num:\n                    highest_neg_even = num\n                if smallest_neg_even is None or smallest_neg_even > num:\n                    smallest_neg_even = num\n            else:\n                if highest_non_neg_even is None or highest_non_neg_even < num:\n                    highest_non_neg_even = num\n                if smallest_non_neg_even is None or smallest_non_neg_even > num:\n                    smallest_non_neg_even = num\n        elif num < 0:\n            if smallest_neg_odd is None or smallest_neg_odd > num:\n                smallest_neg_odd = num\n        elif highest_non_neg_odd is None or highest_non_neg_odd < num:\n            highest_non_neg_odd = num"], [0.9135918021202087, "    for num in lst:\n        if num % 2 == 0:\n            if num >= 0:\n                if min_non_neg_even is None or num < min_non_neg_even:\n                    min_non_neg_even = num\n            elif max_neg_even is None or num > max_neg_even:\n                max_neg_even = num\n        elif num >= 0:\n            if min_non_neg_odd is None or num < min_non_neg_odd:\n                min_non_neg_odd = num\n        elif max_neg_odd is None or num > max_neg_odd:\n            max_neg_odd = num"]]}
{"task_id": "HumanEval/137", "problem": [[0.907997190952301, "    aC = str(a).replace(',', '.') if isinstance(a, str) else str(a)\n    bC = str(b).replace(',', '.') if isinstance(b, str) else str(b)\n    aN = float(aC)\n    bN = float(bC)\n    if aN > bN:\n        return a\n    elif aN < bN:\n        return b\n    return None"], [0.9073505401611328, "    try:\n        if isinstance(a, str):\n            a = float(a.replace(',', '.'))\n        if isinstance(b, str):\n            b = float(b.replace(',', '.'))\n        if a > b:\n            return isinstance(a, float) and str(a).replace('.', ',') or a\n        elif b > a:\n            return isinstance(b, float) and str(b).replace('.', ',') or b\n        return None\n    except ValueError:\n        return None"], [0.9073505401611328, "    try:\n        if isinstance(a, str):\n            a = float(a.replace(',', '.'))\n        if isinstance(b, str):\n            b = float(b.replace(',', '.'))\n        if a > b:\n            return isinstance(a, float) and str(a).replace('.', ',') or a\n        elif b > a:\n            return isinstance(b, float) and str(b).replace('.', ',') or b\n        return None\n    except ValueError:\n        return None"], [0.9062379002571106, "    if num1 == num2:\n        return 'Both numbers are equal.'\n    elif num1 < 0 and num2 < 0:\n        if abs(num1) < abs(num2):\n            return num1\n        else:\n            return num2\n    elif num1 < 0 or num2 < 0:\n        if abs(num1) > abs(num2):\n            return num1\n        else:\n            return num2\n    elif isinstance(num1, float) or isinstance(num2, float):\n        if isinstance(num1, int):\n            num1 = float(num1)\n        if isinstance(num2, int):\n            num2 = float(num2)\n        if num1 > num2:\n            return num1\n        else:\n            return num2\n    elif num1 > num2:\n        return num1\n    else:\n        return num2"], [0.9062379002571106, "    if num1 == num2:\n        return 'Both numbers are equal.'\n    elif num1 < 0 and num2 < 0:\n        if abs(num1) < abs(num2):\n            return num1\n        else:\n            return num2\n    elif num1 < 0 or num2 < 0:\n        if abs(num1) > abs(num2):\n            return num1\n        else:\n            return num2\n    elif isinstance(num1, float) or isinstance(num2, float):\n        if isinstance(num1, int):\n            num1 = float(num1)\n        if isinstance(num2, int):\n            num2 = float(num2)\n        if num1 > num2:\n            return num1\n        else:\n            return num2\n    elif num1 > num2:\n        return num1\n    else:\n        return num2"], [0.9053362607955933, "    if num1 == num2:\n        return 'The two numbers are equal.'\n    elif isinstance(num1, complex) or isinstance(num2, complex):\n        if isinstance(num1, complex) and isinstance(num2, complex):\n            return max(num1, num2, key=lambda x: abs(x))\n        elif isinstance(num1, complex):\n            return num1\n        else:\n            return num2\n    else:\n        num1 = abs(num1)\n        num2 = abs(num2)\n        if num1 == num2:\n            return 'The two numbers have the same absolute value.'\n        elif num1 > num2:\n            return num1\n        else:\n            return num2"], [0.9053362607955933, "    if num1 == num2:\n        return 'The two numbers are equal.'\n    elif isinstance(num1, complex) or isinstance(num2, complex):\n        if isinstance(num1, complex) and isinstance(num2, complex):\n            return max(num1, num2, key=lambda x: abs(x))\n        elif isinstance(num1, complex):\n            return num1\n        else:\n            return num2\n    else:\n        num1 = abs(num1)\n        num2 = abs(num2)\n        if num1 == num2:\n            return 'The two numbers have the same absolute value.'\n        elif num1 > num2:\n            return num1\n        else:\n            return num2"], [0.9019237160682678, "    if len(nums) == 0 and len(strings) == 0:\n        return None\n    elif len(nums) == 0:\n        return max(strings)\n    elif len(strings) == 0:\n        return max(nums)\n    else:\n        max_num = max(nums)\n        max_string = max(strings)\n        if max_num > max_string:\n            return max_num\n        else:\n            return max_string"], [0.9019237160682678, "    if len(nums) == 0 and len(strings) == 0:\n        return None\n    elif len(nums) == 0:\n        return max(strings)\n    elif len(strings) == 0:\n        return max(nums)\n    else:\n        max_num = max(nums)\n        max_string = max(strings)\n        if max_num > max_string:\n            return max_num\n        else:\n            return max_string"], [0.9017466306686401, "    if x > y:\n        return x\n    elif y > x:\n        return y\n    else:\n        return 'Both numbers are equal.'"]]}
{"task_id": "HumanEval/138", "problem": [[0.899093508720398, "    if n % 4 == 0 and n % 2 == 0 and (n > 0):\n        return True"], [0.899093508720398, "    if n % 4 == 0 and n % 2 == 0 and (n > 0):\n        return True"], [0.8961004614830017, "    if sum % 2 == 0:\n        return True\n    else:\n        return False"], [0.896091103553772, "    if sum % 2 == 0:\n        return True\n    else:\n        return False"], [0.8942937254905701, "    divisible_by_4 = n & 3 == 0\n    divisible_by_8 = n & 7 == 0\n    return divisible_by_4 != divisible_by_8"], [0.8938644528388977, "    if n < 3:\n        return False\n    current_num = 2\n    while current_num * 2 < n:\n        sub_sum = n\n        for i in range(current_num):\n            sub_sum = sub_sum - i\n        if sub_sum % current_num == 0:\n            return True\n        current_num = current_num + 1\n    return False"], [0.8936927914619446, "    primes = [2, 3, 5, 7, 11, 13]\n    count = 0\n    for prime in primes:\n        if n % prime == 0:\n            count += 1\n    return count == 4"], [0.8936910629272461, "    primes = [2, 3, 5, 7, 11, 13]\n    count = 0\n    for prime in primes:\n        if n % prime == 0:\n            count += 1\n    return count == 4"]]}
{"task_id": "HumanEval/139", "problem": []}
{"task_id": "HumanEval/140", "problem": [[0.9071969985961914, "    text_without_spaces = text.replace(' ', '')\n    lower_case_text = text_without_spaces.lower()\n    normalized_text = ''\n    for character in lower_case_text:\n        if character.isalnum():\n            normalized_text += character\n        else:\n            normalized_text += '_'\n    return normalized_text"], [0.9062480330467224, "    text = re.sub(' {2,}', '-', text)\n    text = re.sub(' $', '!', text)\n    text = text.replace(' ', '_')\n    text = re.sub('-\\\\b', '_', text)\n    text = re.sub('-{2,}$', lambda m: '!' * len(m.group()), text)\n    return text"], [0.9060805439949036, "    result = ''\n    for char in text:\n        if char.isalnum():\n            result += char.lower()\n        elif char.isspace():\n            continue\n        else:\n            result += '_'\n    return result"], [0.9058205485343933, "    text = re.sub('[^\\\\w\\\\s]', '', text)\n    words = text.split()\n    return '_'.join(words)"], [0.9037963151931763, "    pattern = '[^a-zA-Z0-9\\\\s]'\n    text = re.sub(pattern, '_', text)\n    return text"], [0.9027502536773682, "    input_text = re.sub(' +', ' ', input_text)\n    words = input_text.split(' ')\n    words = [word.upper() for word in words]\n    input_text = '_'.join(words)\n    input_text = re.sub('_+', '-', input_text)\n    return input_text"], [0.9018467664718628, "    text = re.sub('[^ws]', '', text)\n    words = text.split()\n    return '_'.join(words)"], [0.9003390073776245, "    input_string = input_string.strip()\n    words = []\n    current_word = ''\n    for char in input_string:\n        if char.isalpha():\n            current_word += char\n        elif char == ' ':\n            if current_word:\n                words.append(current_word)\n                current_word = ''\n        elif char in string.punctuation:\n            continue\n    if current_word:\n        words.append(current_word)\n    return '_'.join(words)"], [0.8998246192932129, "    return re.sub('(\\\\w+[\\\\.,;:!?\\\\)])( )', '\\\\1_', text)"]]}
{"task_id": "HumanEval/141", "problem": [[0.9410456418991089, "    valid_extensions = ['txt', 'exe', 'dll', 'png', 'jpg', 'jpeg']\n    period_count = file_name.count('.')\n    if period_count != 1:\n        return 'No'\n    split_name = file_name.split('.', 1)\n    if len(split_name[0]) > 5 or not split_name[0][0].isalpha():\n        return 'No'\n    if split_name[1] in valid_extensions:\n        return 'Yes'\n    return 'No'"], [0.9339779615402222, "    reserved_chars = {'<', '>', ':', '\"', '/', '\\\\', '|', '?', '*'}\n    if any((c in file_name for c in reserved_chars)):\n        return 'No'\n    if not 5 <= len(file_name) <= 50:\n        return 'No'\n    parts = file_name.split('.')\n    if len(parts) != 2:\n        return 'No'\n    name, extension = parts\n    if not re.match('^[a-zA-Z][a-zA-Z0-9]*$', name) or not any((c.isupper() for c in name)) or (not any((c.islower() for c in name))) or (len(re.findall('\\\\d{4,}', name)) > 0):\n        return 'No'\n    if extension not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n        return 'No'\n    return 'Yes'"], [0.9334911108016968, "    if not 5 <= len(file_name) <= 50:\n        return 'No'\n    name, dot, extension = file_name.rpartition('.')\n    if not dot or extension not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n        return 'No'\n    if not (re.search('[A-Za-z].*', name) and re.search('[A-Z]', name) and re.search('[a-z]', name) and (not re.search('\\\\d{4,}', name))):\n        return 'No'\n    if len(re.findall('[A-Za-z]', name)) != 2:\n        return 'No'\n    return 'Yes'"], [0.9330171346664429, "    reserved_chars = ['<', '>', ':', '\"', '/', '\\\\', '|', '?', '*']\n    if any((c in file_name for c in reserved_chars)):\n        return 'No'\n    if not 5 <= len(file_name) <= 50:\n        return 'No'\n    parts = file_name.split('.')\n    if len(parts) != 2:\n        return 'No'\n    name, extension = parts\n    if not re.match('^[a-zA-Z][a-zA-Z0-9]*$', name) or not any((c.isupper() for c in name)) or (not any((c.islower() for c in name))) or (len(re.findall('\\\\d{4,}', name)) > 0):\n        return 'No'\n    if extension not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n        return 'No'\n    return 'Yes'"], [0.9325264692306519, "    if not 5 <= len(file_name) <= 50:\n        return 'No'\n    name, dot, extension = file_name.rpartition('.')\n    if not dot or extension not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n        return 'No'\n    if not (re.match('[A-Za-z].*$', name) and re.search('[A-Z]', name) and re.search('[a-z]', name) and (not re.search('\\\\d{4,}', name))):\n        return 'No'\n    if len(re.findall('[A-Za-z]', name)) < 2:\n        return 'No'\n    return 'Yes'"], [0.9294204115867615, "    if len(file_name) < 5 or len(file_name) > 50:\n        return 'No'\n    if not re.match('^(?=.*[a-z])(?=.*[A-Z])(?=.*\\\\d)(?=.*[.])[^A-Z]*{A-Z}[^A-Z]*$', file_name):\n        return 'No'\n    if re.search('\\\\d{4,}', file_name):\n        return 'No'\n    split_name = file_name.split('.')\n    if len(split_name) != 2:\n        return 'No'\n    if not re.match('^[a-zA-Z]', split_name[0]) or len(split_name[0]) < 2:\n        return 'No'\n    valid_extensions = ['txt', 'exe', 'dll', 'pdf', 'jpeg']\n    if split_name[1] not in valid_extensions:\n        return 'No'\n    return 'Yes'"], [0.9277865886688232, "    for name in list_of_file_names:\n        split_name = name.split('.')\n        if len(split_name) != 2 or not split_name[0] or (not split_name[1]):\n            return 'No'\n        if split_name[1].lower() not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n            return 'No'\n        if not re.search('[a-zA-Z].*(a-zA-Z)', split_name[0]) or len(re.findall('\\\\d', split_name[0])) > 3:\n            return 'No'"], [0.9276504516601562, "    for name in list_of_file_names:\n        split_name = name.split('.')\n        if len(split_name) != 2 or not split_name[0] or (not split_name[1]):\n            return 'No'\n        if split_name[1].lower() not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n            return 'No'\n        if not re.search('[a-zA-Z].*[a-zA-Z]', split_name[0]) or len(re.findall('\\\\d', split_name[0])) > 3:\n            return 'No'"], [0.926611065864563, "    extension_regex = re.compile('^.*\\\\.(exe|dll|pdf|jpeg|txt)$')\n    filename_regex = re.compile('^[a-zA-Z]\\\\w{2,}$')\n    alphanumeric_regex = re.compile('^(?=.*[a-z])(?=.*[A-Z])(?=.*\\\\W)(?!.*[0-9]{4,})')\n    if not 5 <= len(file_name) <= 50:\n        return 'No'\n    if not extension_regex.match(file_name):\n        return 'No'\n    filename = file_name.split('.')[0]\n    if not filename_regex.match(filename):\n        return 'No'\n    len_before_alphanumeric_check = len(filename)\n    filename = re.sub('\\\\W+', '', filename)\n    if len_before_alphanumeric_check - len(filename) < 3 or not alphanumeric_regex.match(filename):\n        return 'No'\n    return 'Yes'"], [0.9230705499649048, "    if len(file_name) < 5 or len(file_name) > 50:\n        return 'No'\n    list_of_file_names = file_name.split('/')\n    for name in list_of_file_names:\n        split_name = name.split('.')\n        if len(split_name) != 2 or not split_name[0] or (not split_name[1]):\n            return 'No'\n        if split_name[1].lower() not in ['txt', 'exe', 'dll', 'pdf', 'jpeg']:\n            return 'No'\n        if not re.search('[a-zA-Z].*(a-zA-Z)', split_name[0]) or len(re.findall('\\\\d', split_name[0])) > 3:\n            return 'No'\n    return 'Yes'"]]}
{"task_id": "HumanEval/142", "problem": [[0.921373188495636, "    sum = 0\n    for i in lst:\n        if isinstance(i, list):\n            sum += sum_squares_divisible_by_3(i)\n        elif i % 3 == 0:\n            sum += i ** 2\n    return sum"], [0.9211909770965576, "    for i in lst:\n        if isinstance(i, list):\n            sum += sum_squares_divisible_by_3(i)\n        elif i % 3 == 0:\n            sum += i ** 2"], [0.9195255637168884, "    sum_of_cubes = 0\n    for element in lst:\n        sum_of_cubes += sum_of_digit_cubes(element)\n    return sum_of_cubes"], [0.916732132434845, "    new_lst = []\n    for item in lst:\n        if not isinstance(item, int):\n            continue\n        elif item < 0:\n            continue\n        else:\n            new_lst.append(item ** 3)\n    return new_lst"], [0.9165831804275513, "    sum = 0\n    for num in lst:\n        if num > 0 and num % 2 != 0:\n            sum += num ** 3\n    return sum"], [0.9160711169242859, "    result = 0\n    for num in lst:\n        if num >= 0 and num % 2 == 0 and (num % 5 != 0):\n            result += num ** 3\n    return result"], [0.914875864982605, "    square_list = negative_even_squares(lst)\n    return sum(square_list)"], [0.9137255549430847, "    result = []\n    for i in lst:\n        if type(i) == list:\n            result.append(cube_nested_list(i))\n        else:\n            result.append(i ** 3)\n    return result"], [0.9132936000823975, "    return sum((i ** 3 for i in lst if i > 0))"], [0.9129346013069153, "    filtered_list = [val for val in lst if isinstance(val, (int, float))]\n    processed_list = []\n    for num in filtered_list:\n        cube = num ** 3\n        if cube % 2 == 0:\n            processed_list.append(cube + 3)\n        else:\n            processed_list.append(cube - 2)\n    resulting_list = [val for val in processed_list if val > 10]\n    return resulting_list"]]}
{"task_id": "HumanEval/143", "problem": [[0.9492268562316895, "    words = sentence.split(' ')\n    result = []\n    for word in words:\n        if is_prime(len(word)):\n            result.append(word)\n    return ' '.join(result)"], [0.9318417906761169, "    output = ''\n    words = sentence.split()\n    for word in words:\n        word_stripped = word.strip('.,?!')\n        if check_prime(len(word_stripped)):\n            if output != '':\n                output += ' '\n            output += word\n    return output"], [0.9190689325332642, "    sentence = ''.join(sentence.split(' '))\n    added_chars = set()\n    result = ''\n    for length in range(len(sentence)):\n        if is_prime(length):\n            for i in range(len(sentence) - length + 1):\n                substring = sentence[i:i + length]\n                is_added_before = False\n                for char in substring:\n                    if char in added_chars:\n                        is_added_before = True\n                        break\n                if not is_added_before:\n                    result += substring\n                    for char in substring:\n                        added_chars.add(char)\n    return result"], [0.919049859046936, "    sentence = ''.join(sentence.split(' '))\n    added_chars = set()\n    result = ''\n    for length in range(len(sentence)):\n        if is_prime(length):\n            for i in range(len(sentence) - length + 1):\n                substring = sentence[i:i + length]\n                is_added_before = False\n                for char in substring:\n                    if char in added_chars:\n                        is_added_before = True\n                        break\n                if not is_added_before:\n                    result += substring\n                    for char in substring:\n                        added_chars.add(char)\n    return result"], [0.9125736355781555, "    for word in words:\n        word_stripped = word.strip('.,?!')\n        if check_prime(len(word_stripped)):\n            if output != '':\n                output += ' '\n            output += word"], [0.9065773487091064, "    words = ''\n    unique_words = ''\n    word_start = 0\n    word_end = 0\n    sentence_length = len(sentence)\n    while word_end < sentence_length:\n        if sentence[word_end] == ' ':\n            current_word = sentence[word_start:word_end]\n            if current_word not in words:\n                words += current_word + ' '\n                unique_words += current_word + ' '\n            word_start = word_end + 1\n        word_end += 1\n    current_word = sentence[word_start:word_end]\n    if current_word not in words:\n        unique_words += current_word\n    return unique_words.strip()"], [0.9056922197341919, "    sentence = list(sentence)\n    unique_words = set()\n    current_word = ''\n    updated_sentence = []\n    for char in sentence:\n        if char.isalnum():\n            current_word += char\n        else:\n            if current_word not in unique_words:\n                unique_words.add(current_word)\n                updated_sentence.append(current_word)\n            current_word = ''\n    if current_word not in unique_words:\n        updated_sentence.append(current_word)\n    updated_sentence = ' '.join(updated_sentence)\n    return updated_sentence"], [0.9055370092391968, "    prime_chars = []\n    for char in string:\n        unicode_val = ord(char)\n        if is_prime(unicode_val):\n            prime_chars.append(char)\n    return prime_chars"], [0.9052931666374207, "    for length in range(len(sentence)):\n        if is_prime(length):\n            for i in range(len(sentence) - length + 1):\n                substring = sentence[i:i + length]\n                is_added_before = False\n                for char in substring:\n                    if char in added_chars:\n                        is_added_before = True\n                        break\n                if not is_added_before:\n                    result += substring\n                    for char in substring:\n                        added_chars.add(char)"], [0.9052736163139343, "    for length in range(len(sentence)):\n        if is_prime(length):\n            for i in range(len(sentence) - length + 1):\n                substring = sentence[i:i + length]\n                is_added_before = False\n                for char in substring:\n                    if char in added_chars:\n                        is_added_before = True\n                        break\n                if not is_added_before:\n                    result += substring\n                    for char in substring:\n                        added_chars.add(char)"]]}
{"task_id": "HumanEval/144", "problem": [[0.9128746390342712, "    import math\n    for z in [x, y]:\n        if '/' not in z:\n            return 'Input must be a fraction.'\n        parts = z.split('/')\n        if len(parts) != 2 or not parts[0].isdigit() or (not parts[1].isdigit()):\n            return 'Input must be a valid fraction.'\n    x_num, x_den = map(int, x.split('/'))\n    y_num, y_den = map(int, y.split('/'))\n    num = x_num * y_num\n    den = x_den * y_den\n    gcd = math.gcd(num, den)\n    while gcd != 1:\n        num //= gcd\n        den //= gcd\n        gcd = math.gcd(num, den)\n    return f'{num}/{den}'"], [0.9044533967971802, "    num1 = ''.join((str(i) for i in arr1))\n    num2 = ''.join((str(i) for i in arr2))\n    if num1 == '0' or num2 == '0':\n        return 'Cannot divide by zero'\n    elif int(num1) % int(num2) == 0:\n        return True\n    else:\n        return False"], [0.9025425314903259, "    if num1 == '0' or num2 == '0':\n        return 'Cannot divide by zero'\n    elif int(num1) % int(num2) == 0:\n        return True\n    else:\n        return False"], [0.9005825519561768, "    for z in [x, y]:\n        if '/' not in z:\n            return 'Input must be a fraction.'\n        parts = z.split('/')\n        if len(parts) != 2 or not parts[0].isdigit() or (not parts[1].isdigit()):\n            return 'Input must be a valid fraction.'"], [0.9001284837722778, "    if not (isinstance(x, int) and isinstance(y, int)):\n        return 'Error: Both inputs must be integers.'\n    if x in [-1, 1]:\n        return y == x\n    if x == 0 and y != 0:\n        return True\n    elif y == 0 and x != 0:\n        return True\n    if y == 1:\n        return False\n    while y != 1:\n        if y % x != 0:\n            return False\n        y = y // x\n    return True"], [0.8982381820678711, "    elif num1 % num2 == 0 and num1 > 0 and (num2 > 0):\n        return True\n    else:\n        return False"], [0.8961391448974609, "    if a <= 0 or b <= 0:\n        return 'Error: Both numbers should be positive.'\n    return a % b == 0"], [0.8936072587966919, "    elif int(num1) % int(num2) == 0:\n        return True\n    else:\n        return False"], [0.8933595418930054, "    num1, den1 = fraction1\n    num2, den2 = fraction2\n    common_den = den1 * den2 // math.gcd(den1, den2)\n    num_sum = num1 * common_den // den1 + num2 * common_den // den2\n    common_factor = math.gcd(num_sum, common_den)\n    return (num_sum // common_factor, common_den // common_factor)"], [0.8928163051605225, "    if num2 == 0:\n        return False\n    quotient = num1 // num2\n    product = quotient * num2\n    return product == num1"]]}
{"task_id": "HumanEval/145", "problem": [[0.908768892288208, "    if not arr:\n        return []\n    result = []\n    sum_of_digits = []\n    for i in range(0, len(arr)):\n        digit_sum = 0\n        for j in str(arr[i]):\n            digit_sum += int(j)\n        result.append(arr[i])\n        sum_of_digits.append(digit_sum)\n    sorted_index = [i[0] for i in sorted(enumerate(sum_of_digits), key=lambda p: p[1])]\n    sorted_arr = []\n    for k in sorted_index:\n        sorted_arr.append(result[k])\n    return sorted_arr"], [0.9054207801818848, "    positive_nums = sorted([x for x in a if x >= 0], reverse=True)\n    negative_nums = sorted([x for x in a if x < 0], reverse=True)\n    return positive_nums + negative_nums"], [0.9053500890731812, "    return sorted(lst, key=lambda x: sum_of_digits(x), reverse=True)"], [0.9052106142044067, "    return sorted(arr, key=lambda x: (sum((int(digit) for digit in str(x))), x))"], [0.9051886796951294, "    return sorted(arr, key=lambda x: (sum((int(digit) for digit in str(x))), x))"], [0.9041523337364197, "    n = len(nums)\n    for i in range(n - 1):\n        for j in range(0, n - i - 1):\n            if nums[j] > nums[j + 1]:\n                nums[j], nums[j + 1] = (nums[j + 1], nums[j])\n    sorted_nums = []\n    start_index = 0\n    while start_index < len(nums):\n        end_index = start_index + 1\n        while end_index < len(nums) and nums[start_index] == nums[end_index]:\n            end_index += 1\n        sublist = nums[start_index:end_index]\n        sublist.sort(key=get_digit_sum)\n        sorted_nums.extend(sublist)\n        start_index = end_index\n    return sorted_nums"], [0.9039953947067261, "    sorted_negatives = sorted((x for x in num_list if x < 0))\n    j = 0\n    for i in range(len(num_list)):\n        if num_list[i] < 0:\n            num_list[i] = sorted_negatives[j]\n            j += 1\n    return num_list"], [0.9039610624313354, "    if len(arr) == 0:\n        return arr\n    max_val = max((abs(x) for x in arr))\n    max_digits = len(str(abs(max_val)))\n    buckets = [[] for _ in range(10)]\n    sign_buckets = {True: [], False: []}\n    for i in range(max_digits):\n        for num in arr:\n            digit_val = abs(num // 10 ** i % 10)\n            buckets[digit_val].append(num)\n        arr.clear()\n        for bucket in buckets:\n            arr += bucket\n            bucket.clear()\n    for num in arr:\n        if num < 0:\n            sign_buckets[False].append(num)\n        else:\n            sign_buckets[True].append(num)\n    arr[:] = sign_buckets[False][::-1] + sign_buckets[True]\n    return arr"], [0.9026987552642822, "    arr.sort(key=lambda x: (get_digit_sum(x), x % 10))\n    return arr"], [0.9017442464828491, "    negative_nums = [num for num in list if num < 0]\n    positive_nums = [num for num in list if num >= 0]\n    negative_nums.sort()\n    positive_nums.sort()\n    sorted_list = []\n    for num in reversed(negative_nums):\n        sorted_list.append(num)\n    for num in positive_nums:\n        sorted_list.append(num)\n    return sorted_list"]]}
{"task_id": "HumanEval/146", "problem": [[0.9267112016677856, "    odd_numbers = []\n    for num in array:\n        if num > 10 and num < 100 and (num % 2 != 0):\n            odd_numbers.append(num)\n    return len(odd_numbers)"], [0.9217833280563354, "    count = 0\n    for num in arr:\n        if num > 10 and num < 100 and (num % 2 != 0):\n            count += 1\n    return count"], [0.9186230897903442, "    filtered_nums = []\n    for num in nums:\n        if num > 10:\n            filtered_nums.append(num)\n    return filtered_nums"], [0.9177412986755371, "    count = 0\n    for num in arr:\n        if num > 10 and num % 2 == 0:\n            count += 1\n    return count"], [0.9150418043136597, "    filteredNumbers = []\n    for number in numbers:\n        if number >= 10:\n            filteredNumbers.append(number)\n    return filteredNumbers"], [0.9131412506103516, "    for num in arr:\n        if num > 10 and num < 100 and (num % 2 != 0):\n            count += 1"], [0.9121783971786499, "    count = 0\n    for num in arr:\n        if num > 10 and num % 3 == 0 and (num % 2 != 0):\n            count += 1\n    return count"], [0.9099557995796204, "    for num in nums:\n        if num > 10:\n            filtered_nums.append(num)"], [0.9098466038703918, "    for num in arr:\n        if num > 0 and num % 2 != 0 and (num > 10) and (num < 100):\n            odd_numbers.append(num)"], [0.9080095291137695, "    for num in arr:\n        if num > 10 and num % 2 == 0:\n            count += 1"]]}
{"task_id": "HumanEval/147", "problem": [[0.9420053958892822, "    a = [0] * n\n    count = [0] * 3\n    pairs = [0] * 3\n    triples = 0\n    for i in range(n):\n        a[i] = i * i - i + 1\n        count[a[i] % 3] += 1\n    for j in range(3):\n        for k in range(j + 1, 3):\n            pairs[k] += count[j] * count[k]\n        triples += count[j] * (count[j] - 1) * (count[j] - 2) // 6\n    triples += pairs[0] + 2 * (pairs[1] + pairs[2])\n    return triples"], [0.9334529042243958, "    a = [i * i - i + 1 + i % 3 for i in range(1, n + 1)]\n    triple_count = 0\n    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                product = a[i] * a[j] % a[k]\n                if product % n == 0:\n                    triple_count += 1\n    return triple_count"], [0.9120931029319763, "    count = 0\n    for i in range(1, n + 1):\n        if i % 3 == 0:\n            count += 1\n    return count"], [0.9111279845237732, "    for i in range(n):\n        a[i] = i * i - i + 1\n        count[a[i] % 3] += 1"], [0.9111063480377197, "    if n == 0:\n        return 0\n    elif n == 1:\n        return 1\n    else:\n        count = 0\n        for i in range(1, n + 1):\n            if i % 2 == 0:\n                count += 3 * 2 ** (i // 2 - 1)\n            else:\n                count += 2 * 2 ** (i // 2)\n        return count"], [0.9111063480377197, "    if n == 0:\n        return 0\n    elif n == 1:\n        return 1\n    else:\n        count = 0\n        for i in range(1, n + 1):\n            if i % 2 == 0:\n                count += 3 * 2 ** (i // 2 - 1)\n            else:\n                count += 2 * 2 ** (i // 2)\n        return count"], [0.9105859994888306, "    a, b = (0, 1)\n    result = []\n    while len(result) < n:\n        a, b = (b, a + b)\n        if a % 3 == 0:\n            result.append(a)\n    return result"], [0.9105521440505981, "    a = [i * i - i + p + i % p for i in range(1, n + 1)]\n    counters = 0\n    for i in range(n):\n        for j in range(i + 1, n):\n            for k in range(j + 1, n):\n                product_modulus = a[i] * a[j] % a[k]\n                if product_modulus % n == 0 or product_modulus % p == 0:\n                    counters += 1\n    return counters"], [0.9104490280151367, "    l = set()\n    x = 3\n    while x < n:\n        l.add(x)\n        x += 3\n    return sum(l)"], [0.9094349145889282, "    S = [0 for _ in range(n + 1)]\n    S[0] = S[1] = 1\n    for i in range(2, n + 1):\n        S[i] = 3 * (2 * i - 1) * S[i - 1] // (i - 1) - S[i - 2]\n    return S[n]"]]}
{"task_id": "HumanEval/148", "problem": [[0.9516469836235046, "    solar_system = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']\n    if is_valid(planet1) and is_valid(planet2):\n        planet1_index = solar_system.index(planet1.capitalize())\n        planet2_index = solar_system.index(planet2.capitalize())\n        if planet1_index < planet2_index:\n            return tuple((solar_system[i] for i in range(planet1_index + 1, planet2_index)))\n        if planet2_index < planet1_index:\n            return tuple((solar_system[i] for i in range(planet2_index + 1, planet1_index)))\n        return ()\n    else:\n        return ()"], [0.9484492540359497, "    if not is_valid(planet1) or not is_valid(planet2):\n        return ()\n    planet_order = ('Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune')\n    planet1_index = planet_order.index(planet1)\n    planet2_index = planet_order.index(planet2)\n    if planet1_index < planet2_index:\n        return planet_order[planet1_index + 1:planet2_index]\n    else:\n        return planet_order[planet2_index + 1:planet1_index]"], [0.9441422820091248, "    if is_valid(planet1) and is_valid(planet2):\n        planet1_index = solar_system.index(planet1.capitalize())\n        planet2_index = solar_system.index(planet2.capitalize())\n        if planet1_index < planet2_index:\n            return tuple((solar_system[i] for i in range(planet1_index + 1, planet2_index)))\n        if planet2_index < planet1_index:\n            return tuple((solar_system[i] for i in range(planet2_index + 1, planet1_index)))\n        return ()\n    else:\n        return ()"], [0.9333457350730896, "    if is_valid(planet1) and is_valid(planet2):\n        list_of_planets = sorted(planet_distances.items(), key=lambda x: x[1])\n        planet1_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet1))\n        planet2_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet2))\n        if planet1_index < planet2_index:\n            return tuple(list_of_planets[planet1_index + 1:planet2_index])\n        else:\n            return tuple(list_of_planets[planet2_index + 1:planet1_index])\n    else:\n        return ()"], [0.9333457350730896, "    if is_valid(planet1) and is_valid(planet2):\n        list_of_planets = sorted(planet_distances.items(), key=lambda x: x[1])\n        planet1_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet1))\n        planet2_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet2))\n        if planet1_index < planet2_index:\n            return tuple(list_of_planets[planet1_index + 1:planet2_index])\n        else:\n            return tuple(list_of_planets[planet2_index + 1:planet1_index])\n    else:\n        return ()"], [0.9333393573760986, "    if is_valid(planet1) and is_valid(planet2):\n        list_of_planets = sorted(planet_distances.items(), key=lambda x: x[1])\n        planet1_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet1))\n        planet2_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet2))\n        if planet1_index < planet2_index:\n            return tuple(list_of_planets[planet1_index + 1:planet2_index])\n        else:\n            return tuple(list_of_planets[planet2_index + 1:planet1_index])\n    else:\n        return ()"], [0.9333393573760986, "    if is_valid(planet1) and is_valid(planet2):\n        list_of_planets = sorted(planet_distances.items(), key=lambda x: x[1])\n        planet1_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet1))\n        planet2_index = next((i for i, v in enumerate(list_of_planets) if v[0] == planet2))\n        if planet1_index < planet2_index:\n            return tuple(list_of_planets[planet1_index + 1:planet2_index])\n        else:\n            return tuple(list_of_planets[planet2_index + 1:planet1_index])\n    else:\n        return ()"], [0.9312659502029419, "    if is_valid(planet1) and is_valid(planet2):\n        sorted_planets = sorted(PLANETS, key=PLANETS.get)\n        idx1, idx2 = (sorted_planets.index(planet1), sorted_planets.index(planet2))\n        if idx2 < idx1:\n            idx1, idx2 = (idx2, idx1)\n        planets_between = sorted_planets[idx1 + 1:idx2]\n        result = []\n        for planet in planets_between:\n            time_to_planet = PLANETS[planet] * 10 ** 6 / SPEED_OF_LIGHT\n            result.append((planet, time_to_planet))\n        return tuple(result)\n    else:\n        return ()"], [0.9312659502029419, "    if is_valid(planet1) and is_valid(planet2):\n        sorted_planets = sorted(PLANETS, key=PLANETS.get)\n        idx1, idx2 = (sorted_planets.index(planet1), sorted_planets.index(planet2))\n        if idx2 < idx1:\n            idx1, idx2 = (idx2, idx1)\n        planets_between = sorted_planets[idx1 + 1:idx2]\n        result = []\n        for planet in planets_between:\n            time_to_planet = PLANETS[planet] * 10 ** 6 / SPEED_OF_LIGHT\n            result.append((planet, time_to_planet))\n        return tuple(result)\n    else:\n        return ()"], [0.9286821484565735, "    planet_list = sorted(orbit_time.keys(), key=lambda p: orbit_time[p])\n    if is_valid(planet1) and is_valid(planet2):\n        start = min(planet_list.index(planet1), planet_list.index(planet2))\n        end = max(planet_list.index(planet1), planet_list.index(planet2))\n        return tuple([(planet, round(orbit_time[planet] * LIGHT_SPEED, 2)) for planet in planet_list[start + 1:end]])\n    else:\n        return ()"]]}
{"task_id": "HumanEval/149", "problem": [[0.9334352016448975, "    import re\n    filtered_list = [x for x in lst if len(x) % 2 == 0 and (not bool(re.search('\\\\d', x)))]\n    return sorted(filtered_list, key=lambda x: (len(x), x.lower()), reverse=reverse)"], [0.929091215133667, "    filtered_list = []\n    for word in lst:\n        if len(word) > 4 and any((char.isupper() for char in word)) and (sum((ord(char) for char in word if char.isupper())) % 3 == 0):\n            filtered_list.append(word)\n    return sorted(filtered_list, key=len)"], [0.9260175228118896, "    clean_lst = [s for s in lst if len(s) % 2 == 0 and (not any((c.isdigit() for c in s)))]\n    if not sort_function:\n        sort_function = lambda s: sum((ord(c) for c in s))\n    if secondary_sort_function:\n        clean_lst.sort(key=secondary_sort_function)\n    clean_lst.sort(key=sort_function, reverse=reverse)\n    filtered_lst = [s for s in clean_lst if min_sum <= sort_function(s) <= (max_sum if max_sum else float('inf'))]\n    return filtered_lst"], [0.9242918491363525, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    filtered_words = [word for word in word_list if len(word) % 2 == 0 and word.islower() and (word[0] not in vowels) and (word[-1] not in vowels)]\n    sorted_words = sorted(filtered_words, key=lambda x: (-len(x), x))\n    return sorted_words"], [0.9236211776733398, "    filtered = [string for string in lst if len(string) % 2 == 0 and (not any((char.isdigit() for char in string)))]\n    sorted_list = sorted(filtered, key=lambda x: (len(x), x.casefold()), reverse=reverse)\n    return sorted_list"], [0.9214116930961609, "    cleaned_lst = [i for i in lst if len(i) % 2 == 0 and (not any((c.isdigit() for c in i)))]\n    cleaned_lst = [''.join((c for c in s if c not in string.punctuation)) for s in cleaned_lst]\n    result = sorted(cleaned_lst, key=lambda x: (len(x), x.lower()), reverse=reverse)\n    return result"], [0.9208716154098511, "    if len(word_list) <= 1:\n        return []\n    filtered_words = [word for word in word_list if len(word) % 2 == 0 and word.islower()]\n    filtered_words.sort(key=len, reverse=True)\n    return filtered_words"], [0.9187750816345215, "    filtered_list = []\n    for string in lst:\n        if len(string) > 1:\n            filtered_list.append(string)\n    return filtered_list"], [0.9187374711036682, "    vowels = ['a', 'e', 'i', 'o', 'u']\n    filtered_words = []\n    for word in word_list:\n        if len(word) % 2 == 0 and (not any((c.isupper() for c in word))) and (word[0].lower() not in vowels) and (word[-1].lower() not in vowels):\n            filtered_words.append(word)\n    filtered_words.sort(key=lambda x: (-len(x), x))\n    return filtered_words"], [0.9183799624443054, "    vowels = 'AEIOUaeiou'\n    new_lst = []\n    for string in lst:\n        new_string = ''\n        for char in string:\n            if char not in vowels:\n                new_string += char\n        new_lst.append(new_string)\n    new_lst.sort(reverse=True, key=len)\n    return new_lst"]]}
{"task_id": "HumanEval/150", "problem": [[0.9269874095916748, "    return x if _is_prime(n) else y"], [0.9162203669548035, "    if y_is_prime:\n        print(f'{y} is a prime number with factors: {y_factors}')\n    else:\n        print(f'{y} is not a prime number. Factors: {y_factors}')"], [0.9131581783294678, "    if n > 1:\n        for i in range(2, n):\n            if n % i == 0:\n                is_prime = 'No'\n                break\n        else:\n            is_prime = 'Yes'\n    elif n == 1:\n        is_prime = 'No'\n    else:\n        return 'Error: Input should be greater than 0'"], [0.9127991199493408, "    assert is_prime(4) == 'no'\n    assert is_prime(3) == 'yes'\n    assert is_prime(8) == 'no'"], [0.912460446357727, "        if is_prime(x):\n            print(str(x) + ' is a prime number.')"], [0.9124236702919006, "    elif n == 1:\n        is_prime = 'No'\n    else:\n        return 'Error: Input should be greater than 0'"], [0.9115632176399231, "    elif n > 1:\n        for i in range(2, int(sqrt) + 1):\n            if n % i == 0:\n                return 'neither'\n        return 'prime'\n    else:\n        return 'neither'"], [0.9115540981292725, "    elif n > 1:\n        for i in range(2, int(sqrt) + 1):\n            if n % i == 0:\n                return 'neither'\n        return 'prime'\n    else:\n        return 'neither'"], [0.9112107753753662, "    result = ''\n    if val >= 50:\n        result = 'Passed, '\n    else:\n        result = 'Failed, '\n    if val > 1:\n        for i in range(2, val):\n            if val % i == 0:\n                return result + 'Not Prime'\n        return result + 'Prime Number'\n    else:\n        return result + 'Not Prime'"], [0.9110668301582336, "    try:\n        n = int(n)\n    except ValueError:\n        return 'Error: Input is not an integer'\n    if n % 2 == 0:\n        odd_or_even = 'Even'\n    else:\n        odd_or_even = 'Odd'\n    if n > 1:\n        for i in range(2, n):\n            if n % i == 0:\n                is_prime = 'No'\n                break\n        else:\n            is_prime = 'Yes'\n    elif n == 1:\n        is_prime = 'No'\n    else:\n        return 'Error: Input should be greater than 0'\n    return '{0} is an {1} number and it is {2} a prime number'.format(n, odd_or_even, 'not' if is_prime == 'No' else '')"]]}
{"task_id": "HumanEval/151", "problem": [[0.9263818264007568, "    sum_of_squares = 0\n    for num in lst:\n        if num % 2 == 0:\n            square = num * num\n            sum_of_squares += square\n    return sum_of_squares"], [0.9244989156723022, "    square_list = negative_even_squares(lst)\n    return sum(square_list)"], [0.9234728813171387, "    squared_nums = []\n    total_sum = 0\n    for num in lst:\n        if isinstance(num, int) and num % 2 == 0 and (num < 10):\n            squared_num = num ** 2\n            squared_nums.append(str(squared_num))\n            total_sum += squared_num\n    squared_nums_str = ', '.join(squared_nums)\n    print('Squared numbers:', squared_nums_str)\n    print('Sum of squared numbers:', total_sum)"], [0.9209561347961426, "    return sum((i ** 2 for i in lst if i < 0 and i % 2 == 0))"], [0.9208032488822937, "    return sum((i ** 2 for i in lst if i % 2 == 0))"], [0.9206917881965637, "    sum = 0\n    for num in lst:\n        if num > 0 and num % 2 != 0:\n            sum += num ** 3\n    return sum"], [0.9201177358627319, "    return sum((i ** 2 for i in lst if isinstance(i, int) and i < 0 and (i % 2 == 0)))"], [0.9197143316268921, "    return sum((x ** 2 for x in lst if x % 2 == 0))"], [0.918651282787323, "    sum = 0\n    for num in lst:\n        if num % 2 != 0:\n            sum += num\n    return sum"], [0.9174841046333313, "    result = 0\n    for num in lst:\n        if num >= 0 and num % 2 == 0 and (num % 5 != 0):\n            result += num ** 3\n    return result"]]}
{"task_id": "HumanEval/152", "problem": [[0.9207730293273926, "    differences = []\n    for score, guess in zip(scores, guesses):\n        difference = abs(score - guess)\n        if guess == score:\n            differences.append(difference)\n        else:\n            if guess == 0 and score != 0:\n                difference += 2\n            differences.append(difference)\n    return differences"], [0.9100604057312012, "    for score, guess in zip(scores, guesses):\n        difference = abs(score - guess)\n        if guess == score:\n            differences.append(difference)\n        else:\n            if guess == 0 and score != 0:\n                difference += 2\n            differences.append(difference)"], [0.9060152173042297, "        if guess == score:\n            differences.append(difference)\n        else:\n            if guess == 0 and score != 0:\n                difference += 2\n            differences.append(difference)"], [0.9018695950508118, "    diff = []\n    for i in range(len(arr1)):\n        diff.append(abs(arr1[i] - arr2[i]))\n    return diff"], [0.9006720781326294, "    if len(list1) != len(list2):\n        return 'Error: The lists do not have the same length.'\n    discrepancies = []\n    for i in range(len(list1)):\n        if type(list1[i]) is not int or type(list2[i]) is not int:\n            return 'Error: The lists contain non-numerical values.'\n        discrepancies.append(abs(list1[i] - list2[i]))\n    return discrepancies"], [0.9006077647209167, "    differences = [abs(a - b) for a, b in zip(game, guess)]\n    n = len(differences)\n    mean = sum(differences) / n\n    variance = sum(((xi - mean) ** 2 for xi in differences)) / n\n    std_dev = math.sqrt(variance)\n    differences.append(variance)\n    differences.append(std_dev)\n    return differences"], [0.897401750087738, "    result = []\n    for i in range(len(l1)):\n        result.append(abs(l1[i] - l2[i]))\n    return result"], [0.8895915746688843, "    for i in range(len(list1)):\n        if type(list1[i]) is not int or type(list2[i]) is not int:\n            return 'Error: The lists contain non-numerical values.'\n        discrepancies.append(abs(list1[i] - list2[i]))"], [0.8887806534767151, "    if len(arr_a) != len(arr_b):\n        return 'Arrays are of unequal lengths.'\n    else:\n        return [a - b for a, b in zip(arr_a, arr_b)]"], [0.8887806534767151, "    if len(arr_a) != len(arr_b):\n        return 'Arrays are of unequal lengths.'\n    else:\n        return [a - b for a, b in zip(arr_a, arr_b)]"]]}
{"task_id": "HumanEval/153", "problem": [[0.881567120552063, "    longest_string = ''\n    longest_string_length = 0\n    longest_string_uppercase_count = 0\n    for string in strings:\n        uppercase_count = sum((1 for char in string if char.isupper()))\n        if uppercase_count > 0 and len(string) > longest_string_length:\n            uppercase_chars = [char for char in string if char.isupper()]\n            if uppercase_chars == sorted(uppercase_chars):\n                longest_string = string\n                longest_string_length = len(string)\n                longest_string_uppercase_count = uppercase_count\n    return (longest_string, longest_string_uppercase_count)"], [0.8808785080909729, "    extension_count = {}\n    for file_name in file_names:\n        parts = file_name.split('.')\n        if len(parts) > 1:\n            extension = parts[-1].lower()\n        else:\n            extension = 'No Extension'\n        extension_count[extension] = extension_count.get(extension, 0) + 1\n    return extension_count"], [0.8783256411552429, "    classes = {'A-E': [], 'F-J': [], 'K-O': [], 'P-T': [], 'U-Z': []}\n    for name in names:\n        name = name.upper()\n        if name[0] <= 'E':\n            classes['A-E'].append(name)\n        elif name[0] <= 'J':\n            classes['F-J'].append(name)\n        elif name[0] <= 'O':\n            classes['K-O'].append(name)\n        elif name[0] <= 'T':\n            classes['P-T'].append(name)\n        else:\n            classes['U-Z'].append(name)\n    for key in classes.keys():\n        classes[key] = sorted(classes[key], reverse=True)\n    return classes"], [0.8763468861579895, "    strings = [capitalize_words(string) for string in strings]\n    strings.sort(key=lambda string: len(string.split()), reverse=True)\n    return strings"], [0.875733494758606, "    file_extension_count = {}\n    for file_name in file_names:\n        if '.' in file_name:\n            extension = file_name.split('.')[-1]\n        else:\n            extension = 'No Extension'\n        file_extension_count[extension] = file_extension_count.get(extension, 0) + 1\n    return file_extension_count"], [0.8756536245346069, "    if not names:\n        return ([], 'The list is empty.')\n    lengths = [len(name) for name in names]\n    max_length = max(lengths)\n    longest_names = [name for name in names if len(name) == max_length]\n    if len(longest_names) > 1:\n        result = 'The longest names are ' + ', '.join(longest_names) + ' with a length of ' + str(max_length) + '.'\n    else:\n        result = 'The longest name is ' + longest_names[0] + ' with a length of ' + str(max_length) + '.'\n    return (lengths, result)"], [0.8749217987060547, "    frequency = {}\n    max_count = 0\n    most_frequent_name = ''\n    for name in names:\n        lowercase_name = name.lower()\n        if lowercase_name in frequency:\n            frequency[lowercase_name] += 1\n        else:\n            frequency[lowercase_name] = 1\n        if frequency[lowercase_name] > max_count:\n            max_count = frequency[lowercase_name]\n            most_frequent_name = lowercase_name\n    return most_frequent_name"], [0.8733556270599365, "    longestString = ''\n    for string in strings:\n        if any((char.isupper() for char in string)):\n            if len(string) > len(longestString):\n                uppercase_letters = [char for char in string if char.isupper()]\n                if uppercase_letters == sorted(uppercase_letters):\n                    longestString = string\n    return longestString"], [0.8732947111129761, "    for string in strings:\n        uppercase_count = sum((1 for char in string if char.isupper()))\n        if uppercase_count > 0 and len(string) > longest_string_length:\n            uppercase_chars = [char for char in string if char.isupper()]\n            if uppercase_chars == sorted(uppercase_chars):\n                longest_string = string\n                longest_string_length = len(string)\n                longest_string_uppercase_count = uppercase_count"], [0.8729702234268188, "    extension_count = {}\n    for file_name in file_list:\n        parts = file_name.split('.')\n        if len(parts) > 1:\n            extension = parts[-1]\n        else:\n            extension = ''\n        extension_count[extension] = extension_count.get(extension, 0) + 1\n    return extension_count"]]}
{"task_id": "HumanEval/154", "problem": [[0.9380649924278259, "    import re\n    a = re.sub('[^a-zA-Z]', '', a.lower())\n    b = re.sub('[^a-zA-Z]', '', b.lower())\n    if len(b) > len(a):\n        return False\n    for i in range(len(b)):\n        rotation = b[i:] + b[:i]\n        if rotation in a:\n            return True\n    return False"], [0.9366060495376587, "    import re\n    a = re.sub('[\\\\W_]+', '', a).lower()\n    b = re.sub('[\\\\W_]+', '', b).lower()\n    if set(a) != set(b):\n        return False\n    rotated_b = [b[i:] + b[:i] for i in range(len(b))]\n    for i in range(len(a) - len(b) + 1):\n        if a[i:i + len(b)] in rotated_b:\n            return True\n    return False"], [0.9342398643493652, "    for i in range(len(b)):\n        rotation = b[i:] + b[:i]\n        if rotation in a:\n            return True"], [0.9335331916809082, "    for i in range(len(a) - len(b) + 1):\n        if a[i:i + len(b)] in rotated_b:\n            return True"], [0.9331351518630981, "    a_clean = ''.join((e for e in a if e.isalnum())).lower()\n    b_clean = ''.join((e for e in b if e.isalnum())).lower()\n    if len(b_clean) > len(a_clean):\n        return False\n    a_twice = a_clean + a_clean\n    for i in range(len(b_clean)):\n        rotated_b = b_clean[i:] + b_clean[:i]\n        if rotated_b in a_twice:\n            return True\n    return False"], [0.9331250786781311, "    a_clean = ''.join((e for e in a if e.isalnum())).lower()\n    b_clean = ''.join((e for e in b if e.isalnum())).lower()\n    if len(b_clean) > len(a_clean):\n        return False\n    a_twice = a_clean + a_clean\n    for i in range(len(b_clean)):\n        rotated_b = b_clean[i:] + b_clean[:i]\n        if rotated_b in a_twice:\n            return True\n    return False"], [0.9297969341278076, "    n = len(b)\n    if n == 0:\n        return True\n    if n > len(a):\n        return False\n    for i in range(n):\n        if b in a:\n            return True\n        b = b[n - 1:] + b[:n - 1]\n    return False"], [0.9297138452529907, "    a = ''.join(re.findall('[a-zA-Z0-9]*', a)).lower()\n    b = ''.join(re.findall('[a-zA-Z0-9]*', b)).lower()\n    cycle = lambda s: [s[i:] + s[:i] for i in range(len(s))]\n    return any((c in a for c in cycle(b)))"], [0.9292978048324585, "    a = ''.join((e for e in a if e.isalnum())).lower()\n    b = ''.join((e for e in b if e.isalnum())).lower()\n    b_rotations = [b[i:] + b[:i] for i in range(len(b))]\n    for b_rot in b_rotations:\n        if b_rot in a:\n            return True\n    return False"], [0.9257858991622925, "    a = a.lower()\n    b = b.lower()\n    if len(b) > len(a):\n        return False\n    for _ in b:\n        if b in a:\n            return True\n        b = b[1:] + b[0]\n    return False"]]}
{"task_id": "HumanEval/155", "problem": [[0.9415621757507324, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if digit.isdigit():\n            if int(digit) % 2 == 0:\n                even_count += 1\n            else:\n                odd_count += 1\n    return (even_count, odd_count)"], [0.9414446949958801, "    even_count = 0\n    odd_count = 0\n    num = abs(num)\n    for digit in str(num):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9399968981742859, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9399964213371277, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.939993143081665, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9399926066398621, "    even_count = 0\n    odd_count = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9383900761604309, "    even_count = 0\n    odd_count = 0\n    num = abs(num)\n    for digit in str(num):\n        if digit != '0':\n            if int(digit) % 2 == 0:\n                even_count += 1\n            else:\n                odd_count += 1\n        else:\n            even_count += 1\n    return (even_count, odd_count)"], [0.9340523481369019, "    num = int(num)\n    num_str = str(num)\n    if num_str[0] == '-':\n        num_str = num_str[1:]\n    elif num_str[0] == '0' and len(num_str) > 1:\n        num_str = num_str.lstrip('0')\n    even_count = 0\n    odd_count = 0\n    for digit in num_str:\n        if int(digit) % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"], [0.9307491183280945, "    even_count = 0\n    odd_count = 0\n    even_sum = 0\n    odd_sum = 0\n    for digit in str(abs(num)):\n        if int(digit) % 2 == 0:\n            even_count += 1\n            even_sum += int(digit)\n        else:\n            odd_count += 1\n            odd_sum += int(digit)\n    return ((even_count, odd_count), (even_sum, odd_sum))"], [0.9207031726837158, "    even_count = 0\n    odd_count = 0\n    for num in arr:\n        if num % 2 == 0:\n            even_count += 1\n        else:\n            odd_count += 1\n    return (even_count, odd_count)"]]}
{"task_id": "HumanEval/156", "problem": [[0.920760452747345, "    elif num >= 400:\n        return 'CD' + intToRoman(num - 400)\n    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9206554889678955, "    elif num >= 500:\n        return 'D' + intToRoman(num - 500)\n    elif num >= 400:\n        return 'CD' + intToRoman(num - 400)\n    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9205751419067383, "    elif num >= 900:\n        return 'CM' + intToRoman(num - 900)\n    elif num >= 500:\n        return 'D' + intToRoman(num - 500)\n    elif num >= 400:\n        return 'CD' + intToRoman(num - 400)\n    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9203097224235535, "    if num >= 1000:\n        return 'M' + intToRoman(num - 1000)\n    elif num >= 900:\n        return 'CM' + intToRoman(num - 900)\n    elif num >= 500:\n        return 'D' + intToRoman(num - 500)\n    elif num >= 400:\n        return 'CD' + intToRoman(num - 400)\n    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9203097224235535, "    if num >= 1000:\n        return 'M' + intToRoman(num - 1000)\n    elif num >= 900:\n        return 'CM' + intToRoman(num - 900)\n    elif num >= 500:\n        return 'D' + intToRoman(num - 500)\n    elif num >= 400:\n        return 'CD' + intToRoman(num - 400)\n    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9196265935897827, "    values = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]\n    numerals = ['m', 'cm', 'd', 'cd', 'c', 'xc', 'l', 'xl', 'x', 'ix', 'v', 'iv', 'i']\n    mini_roman = ''\n    for i in range(len(values)):\n        count = num // values[i]\n        num %= values[i]\n        mini_roman += numerals[i] * count\n    return mini_roman"], [0.9194827675819397, "    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9193638563156128, "    elif num >= 100:\n        return 'C' + intToRoman(num - 100)\n    elif num >= 90:\n        return 'XC' + intToRoman(num - 90)\n    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9176202416419983, "    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"], [0.9172192811965942, "    elif num >= 50:\n        return 'L' + intToRoman(num - 50)\n    elif num >= 40:\n        return 'XL' + intToRoman(num - 40)\n    elif num >= 10:\n        return 'X' + intToRoman(num - 10)\n    elif num >= 9:\n        return 'IX' + intToRoman(num - 9)\n    elif num >= 5:\n        return 'V' + intToRoman(num - 5)\n    elif num >= 4:\n        return 'IV' + intToRoman(num - 4)\n    elif num >= 1:\n        return 'I' + intToRoman(num - 1)\n    else:\n        return ''"]]}
{"task_id": "HumanEval/157", "problem": [[0.9295626282691956, "    sides = sorted([a, b, c])\n    if sides[0] ** 2 + sides[1] ** 2 == sides[2] ** 2:\n        print(\"It's a right-angled triangle.\")\n        area = 0.5 * sides[0] * sides[1]\n        print('Area of the triangle is', area, 'square units.')\n    else:\n        print(\"It's not a right-angled triangle.\")"], [0.9227838516235352, "    if sides[0] ** 2 + sides[1] ** 2 == sides[2] ** 2:\n        print(\"It's a right-angled triangle.\")\n        area = 0.5 * sides[0] * sides[1]\n        print('Area of the triangle is', area, 'square units.')\n    else:\n        print(\"It's not a right-angled triangle.\")"], [0.9137266278266907, "    if a <= 0 or b <= 0 or c <= 0 or (a + b <= c) or (a + c <= b) or (b + c <= a):\n        raise ValueError('Invalid side lengths. They do not form a valid triangle.')\n    s = (a + b + c) / 2\n    area = math.sqrt(s * (s - a) * (s - b) * (s - c))\n    perimeter = a + b + c\n    is_right_angled = a ** 2 + b ** 2 == c ** 2 or a ** 2 + c ** 2 == b ** 2 or b ** 2 + c ** 2 == a ** 2\n    return (area, perimeter, is_right_angled)"], [0.9122225046157837, "    elif s1 ** 2 + s2 ** 2 == s3 ** 2 or s2 ** 2 + s3 ** 2 == s1 ** 2 or s3 ** 2 + s1 ** 2 == s2 ** 2:\n        return 'Right'\n    else:\n        return 'Scalene'"], [0.9091096520423889, "    if a <= 0 or b <= 0 or c <= 0:\n        return False\n    if a + b <= c or a + c <= b or b + c <= a:\n        return False\n    sides = sorted([a, b, c])\n    return sides[2] ** 2 == sides[0] ** 2 + sides[1] ** 2"], [0.9078623056411743, "    sides = sorted([a, b, c])\n    a, b, c = (sides[0], sides[1], sides[2])\n    if a ** 2 + b ** 2 == c ** 2:\n        return True\n    else:\n        return False"], [0.9069454073905945, "    if side1 + side2 > side3 and side1 + side3 > side2 and (side2 + side3 > side1):\n        return True\n    else:\n        return False"], [0.9069454073905945, "    if side1 + side2 > side3 and side1 + side3 > side2 and (side2 + side3 > side1):\n        return True\n    else:\n        return False"], [0.906613826751709, "    if a + b > c and a + c > b and (b + c > a):\n        return True\n    else:\n        return False"], [0.906613826751709, "    if a + b > c and a + c > b and (b + c > a):\n        return True\n    else:\n        return False"]]}
{"task_id": "HumanEval/158", "problem": [[0.9479293823242188, "    max_word = ''\n    max_unique_chars = 0\n    for word in words:\n        unique_chars = set(word.lower())\n        num_unique_chars = len(unique_chars)\n        if num_unique_chars == max_unique_chars:\n            if word.lower() < max_word.lower():\n                max_word = word\n        elif num_unique_chars > max_unique_chars:\n            max_word = word\n            max_unique_chars = num_unique_chars\n    return max_word"], [0.9440244436264038, "    max_unique_count = 0\n    max_unique_word = ''\n    for word in words:\n        unique_chars = len(set(word.lower()))\n        if unique_chars > max_unique_count:\n            max_unique_count = unique_chars\n            max_unique_word = word\n        elif unique_chars == max_unique_count:\n            max_unique_word = min(max_unique_word, word)\n    return max_unique_word"], [0.9437535405158997, "    max_unique_count = 0\n    max_word = None\n    for word in words:\n        unique_count = len(set(word.lower()))\n        if unique_count > max_unique_count:\n            max_unique_count = unique_count\n            max_word = word\n        elif unique_count == max_unique_count:\n            max_word = min(word, max_word)\n    return max_word"], [0.9406874179840088, "    max_unique_count = 0\n    max_unique_word = None\n    for word in sorted(words):\n        temp_word = word\n        if not case_sensitive:\n            temp_word = word.lower()\n        unique_char_count = len(set(temp_word))\n        if unique_char_count > max_unique_count:\n            max_unique_count = unique_char_count\n            max_unique_word = word\n    return max_unique_word"], [0.9372619390487671, "    for word in words:\n        unique_chars = set(word.lower())\n        num_unique_chars = len(unique_chars)\n        if num_unique_chars == max_unique_chars:\n            if word.lower() < max_word.lower():\n                max_word = word\n        elif num_unique_chars > max_unique_chars:\n            max_word = word\n            max_unique_chars = num_unique_chars"], [0.9370896816253662, "    max_word = words[0]\n    max_unique = 0\n    for word in words:\n        temp_word = word\n        if not case_sensitive:\n            temp_word = word.lower()\n        unique_count = len(set(temp_word))\n        if unique_count > max_unique or (unique_count == max_unique and word < max_word):\n            max_unique = unique_count\n            max_word = word\n    return max_word"], [0.93565434217453, "    for word in words:\n        unique_count = len(set(word.lower()))\n        if unique_count > max_unique_count:\n            max_unique_count = unique_count\n            max_word = word\n        elif unique_count == max_unique_count:\n            max_word = min(word, max_word)"], [0.9337390661239624, "    for word in words:\n        unique_chars = len(set(word.lower()))\n        if unique_chars > max_unique_count:\n            max_unique_count = unique_chars\n            max_unique_word = word\n        elif unique_chars == max_unique_count:\n            max_unique_word = min(max_unique_word, word)"], [0.9329670667648315, "    if len(words) == 0:\n        return ''\n    longest_word = ''\n    max_length = 0\n    for word in words:\n        if len(word) > max_length:\n            if len(set(word)) == len(word):\n                longest_word = word\n                max_length = len(word)\n    return longest_word"], [0.9328545331954956, "    if not words:\n        raise ValueError(\"'words' list can't be empty\")\n    max_count, max_word = (0, '')\n    for word in words:\n        unique_chars = set(word.lower()) if not case_sensitive else set(word)\n        if len(unique_chars) > max_count or (len(unique_chars) == max_count and word < max_word):\n            max_count = len(unique_chars)\n            max_word = word\n    return max_word"]]}
{"task_id": "HumanEval/159", "problem": [[0.874882698059082, "    postEatWeight = totalWeight - amountEaten\n    combinedWeight = postEatWeight / 7\n    largerBoxPostEat = combinedWeight * 4\n    smallerBoxPostEat = combinedWeight * 3\n    largerBox = largerBoxPostEat + amountEaten\n    smallerBox = smallerBoxPostEat\n    return (round(largerBox), round(smallerBox))"], [0.8630219101905823, "    left_over = n\n    distribution = {}\n    for veg in vegetables:\n        name, amount = veg.split(' ')\n        amount = int(amount)\n        left_over -= amount\n    if left_over < 0:\n        return 'Error: More vegetables present than total number in the crate.'\n    for leftover in servings:\n        serving = servings[leftover]\n        if type(serving) == str:\n            serving = int(serving.strip('%')) / 100\n        distribution[leftover] = serving * left_over\n    return distribution"], [0.8627986311912537, "    total_weight = 50\n    weight_removed = 7\n    ratio = 7 / 3\n    boxB_weight = (total_weight - weight_removed) / (ratio + 1)\n    boxA_weight = total_weight - boxB_weight\n    return (boxA_weight, boxB_weight)"], [0.8596807718276978, "    elif d1 > d2:\n        res = num[0] + d2\n    else:\n        res = num[1] + d1"], [0.8566960692405701, "    fulfilled_requests = [0] * len(request_list)\n    remaining_requests = request_list.copy()\n    for i in range(len(request_list)):\n        if num_books >= request_list[i]:\n            fulfilled_requests[i] = 1\n            remaining_requests[i] = 0\n            num_books -= request_list[i]\n        else:\n            remaining_requests[i] -= num_books\n            num_books = 0\n    return (fulfilled_requests, remaining_requests)"], [0.8566628098487854, "    left = 0\n    right = len(arr) - 1\n    while left < right:\n        s = arr[left] + arr[right]\n        if s == num:\n            return (arr[left], arr[right])\n        elif s > num:\n            right -= 1\n        else:\n            left += 1\n    return None"], [0.8560139536857605, "    remaining_strawberries = max_strawberries + jonathon_strawberries - consumed_strawberries\n    return remaining_strawberries"], [0.8556411266326904, "    bagels = (N - A) / 3\n    croissants = A + 2 * bagels\n    breadsticks = N - croissants - bagels\n    return (bagels, croissants, breadsticks)"], [0.8553732633590698, "    if first_number < min_rest:\n        return first_number\n    else:\n        return min_rest"], [0.8549933433532715, "    while left < right:\n        s = arr[left] + arr[right]\n        if s == num:\n            return (arr[left], arr[right])\n        elif s > num:\n            right -= 1\n        else:\n            left += 1"]]}
{"task_id": "HumanEval/160", "problem": [[0.9237489700317383, "    result = operand[0]\n    for i in range(len(operator)):\n        if operator[i] == '+':\n            result += operand[i + 1]\n        elif operator[i] == '-':\n            result -= operand[i + 1]\n        elif operator[i] == '*':\n            result *= operand[i + 1]\n        elif operator[i] == '//':\n            result //= operand[i + 1]\n        elif operator[i] == '**':\n            result **= operand[i + 1]\n        elif operator[i] == 'sin':\n            result -= math.sin(math.radians(operand[i + 1]))\n        elif operator[i] == 'cos':\n            result -= math.cos(math.radians(operand[i + 1]))\n        elif operator[i] == 'tan':\n            result -= math.tan(math.radians(operand[i + 1]))\n    return result"], [0.9206002950668335, "    result = operand_set[0]\n    operator_mapping = {'+': lambda x, y: x + y, '-': lambda x, y: x - y, '*': lambda x, y: x * y, '/': lambda x, y: x / y, '**': lambda x, y: x ** y}\n    for i in range(1, len(operand_set)):\n        operator = operator_mapping[operator_set[i - 1]]\n        result = operator(result, operand_set[i])\n    return result"], [0.9184269905090332, "    operation_mapping = {'+': operator.add, '-': operator.sub, '*': operator.mul, '//': operator.floordiv, '**': operator.pow}\n    if len(operator_set) != len(operand_set) - 1:\n        raise ValueError('Invalid lengths of operator_set and operand_set')\n    operation_sequence = [(operation_mapping[op], operand_set[i + 1]) for i, op in enumerate(operator_set)]\n    final_result = functools.reduce(lambda x, tup: tup[0](x, tup[1]), operation_sequence, operand_set[0])\n    return final_result"], [0.9172701239585876, "    elif operator == '-':\n        return str(int(operand_values[0]) - sum([int(value) for value in operand_values[1:]]))\n    elif operator == '*':\n        return str(int(operand_values[0]) * int(operand_values[1]))\n    elif operator == '/':\n        return str(int(operand_values[0]) / int(operand_values[1]))"], [0.9168603420257568, "    elif operator == '-':\n        return operand1 - operand2\n    elif operator == '*':\n        return operand1 * operand2\n    elif operator == '/':\n        return operand1 / operand2"], [0.9166440963745117, "    ops = {'+': operator.add, '-': operator.sub, '*': operator.mul, '//': operator.floordiv, '**': operator.pow}\n    result = operand_set[0]\n    for index in range(len(operator_set)):\n        result = ops[operator_set[index]](result, operand_set[index + 1])\n    return result"], [0.9161158204078674, "    for i in range(0, len(operators)):\n        op = operators[i]\n        num = operands[i + 1]\n        if op == '+':\n            result += num\n        elif op == '-':\n            result -= num\n        elif op == '*':\n            result *= num\n        elif op == '/':\n            result /= num\n        elif op == '//':\n            result //= num\n        elif op == '**':\n            result **= num\n        elif op == '%':\n            result %= num\n        else:\n            return 'Invalid operator found: {0}'.format(op)"], [0.916101336479187, "    for i in range(0, len(operators)):\n        op = operators[i]\n        num = operands[i + 1]\n        if op == '+':\n            result += num\n        elif op == '-':\n            result -= num\n        elif op == '*':\n            result *= num\n        elif op == '/':\n            result /= num\n        elif op == '//':\n            result //= num\n        elif op == '**':\n            result **= num\n        elif op == '%':\n            result %= num\n        else:\n            return 'Invalid operator found: {0}'.format(op)"], [0.9160983562469482, "    for i in range(0, len(operators)):\n        op = operators[i]\n        num = operands[i + 1]\n        if op == '+':\n            result += num\n        elif op == '-':\n            result -= num\n        elif op == '*':\n            result *= num\n        elif op == '/':\n            result /= num\n        elif op == '//':\n            result //= num\n        elif op == '**':\n            result **= num\n        elif op == '%':\n            result %= num\n        else:\n            return 'Invalid operator found: {0}'.format(op)"], [0.9152498245239258, "        elif operator == '-':\n            return left_operand - right_operand\n        elif operator == '*':\n            return left_operand * right_operand\n        elif operator == '/':\n            return left_operand / right_operand"]]}
{"task_id": "HumanEval/161", "problem": [[0.9295119643211365, "    if not any((char.isalpha() for char in s)):\n        return s[::-1]\n    else:\n        result = ''\n        for char in s:\n            if char.isalpha():\n                if char.islower():\n                    result += char.upper()\n                else:\n                    result += char.lower()\n            else:\n                result += char\n        return result"], [0.9295119643211365, "    alpha_list = [c for c in s if c.isalpha()]\n    alpha_list.reverse()\n    result = ''\n    j = 0\n    for i in range(len(s)):\n        if s[i].isalpha():\n            result += alpha_list[j].swapcase()\n            j += 1\n        else:\n            result += s[i]\n    return result"], [0.9295119643211365, "    if not any((char.isalpha() for char in s)):\n        return s[::-1]\n    else:\n        result = ''\n        for char in s:\n            if char.isalpha():\n                if char.islower():\n                    result += char.upper()\n                else:\n                    result += char.lower()\n            else:\n                result += char\n        return result"], [0.9260289669036865, "    s = ''.join([i for i in s if i.isalpha()])\n    return s[::-1]"], [0.9219298362731934, "    non_alpha_chars = [(i, c) for i, c in enumerate(s) if not c.isalpha()]\n    reversed_str = [c for c in reversed(s) if c.isalpha()]\n    for i, c in non_alpha_chars:\n        reversed_str.insert(i, c)\n    result = ''.join(reversed_str)\n    return result"], [0.9216717481613159, "    reversed_str = ''\n    for char in input_str:\n        if char.isalpha():\n            if char.islower():\n                reversed_str = char.upper() + reversed_str\n            else:\n                reversed_str = char.lower() + reversed_str\n        else:\n            reversed_str = char + reversed_str\n    return reversed_str"], [0.920608401298523, "    reversed_str = ''\n    for char in input_str:\n        if char.isalpha():\n            if char.isupper():\n                reversed_str = char.lower() + reversed_str\n            else:\n                reversed_str = char.upper() + reversed_str\n        else:\n            reversed_str = char + reversed_str\n    return reversed_str"], [0.9176254868507385, "    result = ''\n    for char in s:\n        if char.isalpha():\n            if char.islower():\n                result += char.upper()\n            else:\n                result += char.lower()\n        else:\n            result += char\n    return result"], [0.9168269634246826, "    result = ''\n    for letter in s:\n        if letter.isupper():\n            result += letter.lower()\n        else:\n            result += letter.upper()\n    return result"], [0.9162634015083313, "    swapped = ''\n    for char in s:\n        if char.isalpha():\n            if char.islower():\n                swapped += char.upper()\n            else:\n                swapped += char.lower()\n        else:\n            swapped += char\n    return swapped"]]}
{"task_id": "HumanEval/162", "problem": [[0.9239767789840698, "    if text == '':\n        return None\n    hash_object = hashlib.md5()\n    hash_object.update(text.encode('utf-8'))\n    return hash_object.hexdigest()"], [0.8963247537612915, "    if not isinstance(text, str):\n        print('The input must be a string.')\n        return None\n    elif not text:\n        print('The string must not be empty.')\n        return None"], [0.8935219049453735, "    hasher = hashlib.md5()\n    hasher.update(input_string.encode('utf-8'))\n    return hasher.hexdigest()"], [0.8925294280052185, "    m = hashlib.md5()\n    m.update(input_string.encode('utf-8'))\n    return m.hexdigest()"], [0.890769898891449, "    elif not text:\n        print('The string must not be empty.')\n        return None"], [0.8897905349731445, "    result = hashlib.sha256(text.encode()).hexdigest()\n    return result"], [0.8896827697753906, "    return hashlib.md5(input_string).hexdigest()"], [0.8884862065315247, "    if text is None or text == '':\n        return 'The text is empty or null.'"], [0.8884673118591309, "    if text is None or text == '':\n        return 'The text is empty or null.'"], [0.8866147994995117, "    md5_hash = hashlib.md5()\n    md5_hash.update(input_string.encode('utf-8'))\n    return md5_hash.hexdigest()[:length]"]]}
{"task_id": "HumanEval/163", "problem": [[0.9128303527832031, "    even_numbers = []\n    for i in range(2, n + 1, 2):\n        even_numbers.append(i)\n    return even_numbers"], [0.9123980402946472, "    even_numbers = []\n    for number in range(start, end + 1):\n        if number % 2 == 0:\n            even_numbers.append(number)\n    return even_numbers"], [0.9086024165153503, "    even_numbers = []\n    i = 0\n    while len(even_numbers) < n:\n        if i % 2 == 0:\n            even_numbers.append(i)\n        i += 1\n    return even_numbers"], [0.9073820114135742, "    even_numbers = []\n    for i in range(number + 1):\n        if i % 2 == 0:\n            even_numbers.append(i)\n    print('Even numbers between 0 and {}: {}'.format(number, even_numbers))"], [0.9058805704116821, "    even_list = []\n    for num in range(0, 101):\n        if num % 2 == 0:\n            even_list.append(num)\n    return even_list"], [0.90535569190979, "    return list((i for i in range(a, b + 1) if i % 2 == 0))"], [0.9046947956085205, "    even_nums = []\n    for i in range(0, num + 1):\n        if i % 2 == 0:\n            even_nums.append(i)\n    print(even_nums)"], [0.9042752385139465, "    evens = []\n    for i in range(1, num + 1):\n        if i % 2 == 0:\n            evens.append(i)\n    return evens"], [0.9034497737884521, "    for number in range(start, end + 1):\n        if number % 2 == 0:\n            even_numbers.append(number)"], [0.9021055102348328, "    even_numbers = []\n    for i in range(start, end + 1):\n        if even and lst[i] % 2 == 0:\n            even_numbers.append(lst[i])\n        elif not even and lst[i] % 2 != 0:\n            even_numbers.append(lst[i])\n    return even_numbers"]]}
