<jupyter_start><jupyter_text>algorithm<jupyter_code>def mccarthy91(n):
    k = 1
    while k:
        if n > 100:
            n -= 10
            k -= 1
        else:
            n += 11
            k += 1
    return n<jupyter_output><empty_output><jupyter_text>don't forget to increase stack limit for recursive version<jupyter_code>def mccarthy91_rec(n):
    if n > 100:
        return n - 10
    else:
        return mccarthy91_rec(mccarthy91_rec(n + 11))<jupyter_output><empty_output><jupyter_text>run<jupyter_code>for i in range(70, 130, 10):
    print(i, mccarthy91(i))
    print(i + 1, mccarthy91(i + 1))<jupyter_output>70 91
71 91
80 91
81 91
90 91
91 91
100 91
101 91
110 100
111 101
120 110
121 111
{'fraction_non_alphanumeric': 0.09887005649717515, 'fraction_numerical': 0.13559322033898305, 'mean_word_length': 2.635897435897436, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '14003', 'license': 'MIT', 'n_tokens_mistral': 360, 'n_tokens_neox': 274, 'n_words': 73, 'path': '100days/day 11 - McCarthy 91.ipynb', 'repo_name': 'gopala-kr/ds-notebooks', 'size': '708'}