> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# Number Theory in Python with Tests

> All 14 Number Theory LeetCode problems with tested Python solutions.

Number Theory holds 14 problems (2 Easy, 7 Medium, 5 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

| # | Problem | Difficulty | Solution |
| - | - | - | - |
| 204 | [Count Primes](https://leetcode-py.wisl.dev/problems/count-primes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_primes/solution.py) |
| 258 | [Add Digits](https://leetcode-py.wisl.dev/problems/add-digits) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/add_digits/solution.py) |
| 858 | [Mirror Reflection](https://leetcode-py.wisl.dev/problems/mirror-reflection) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/mirror_reflection/solution.py) |
| 866 | [Prime Palindrome](https://leetcode-py.wisl.dev/problems/prime-palindrome) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/prime_palindrome/solution.py) |
| 878 | [Nth Magical Number](https://leetcode-py.wisl.dev/problems/nth-magical-number) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/nth_magical_number/solution.py) |
| 914 | [X of a Kind in a Deck of Cards](https://leetcode-py.wisl.dev/problems/x-of-a-kind-in-a-deck-of-cards) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/x_of_a_kind_in_a_deck_of_cards/solution.py) |
| 952 | [Largest Component Size by Common Factor](https://leetcode-py.wisl.dev/problems/largest-component-size-by-common-factor) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_component_size_by_common_factor/solution.py) |
| 1799 | [Maximize Score After N Operations](https://leetcode-py.wisl.dev/problems/maximize-score-after-n-operations) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximize_score_after_n_operations/solution.py) |
| 2001 | [Number of Pairs of Interchangeable Rectangles](https://leetcode-py.wisl.dev/problems/number-of-pairs-of-interchangeable-rectangles) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_pairs_of_interchangeable_rectangles/solution.py) |
| 2523 | [Closest Prime Numbers in Range](https://leetcode-py.wisl.dev/problems/closest-prime-numbers-in-range) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/closest_prime_numbers_in_range/solution.py) |
| 2601 | [Prime Subtraction Operation](https://leetcode-py.wisl.dev/problems/prime-subtraction-operation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/prime_subtraction_operation/solution.py) |
| 2709 | [Greatest Common Divisor Traversal](https://leetcode-py.wisl.dev/problems/greatest-common-divisor-traversal) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/greatest_common_divisor_traversal/solution.py) |
| 2807 | [Insert Greatest Common Divisors in Linked List](https://leetcode-py.wisl.dev/problems/insert-greatest-common-divisors-in-linked-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/insert_greatest_common_divisors_in_linked_list/solution.py) |
| 2818 | [Apply Operations to Maximize Score](https://leetcode-py.wisl.dev/problems/apply-operations-to-maximize-score) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_operations_to_maximize_score/solution.py) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.