Write tools that expand a power term by term, find a remainder from two terms, and add the first terms of .
The idea. The terms of are . Modulo , behaves like . For small , the first few terms of are close to the whole value.
Your tasks.
terms, return the list of the terms of , as whole numbers.remainder_mod_square, return the remainder of divided by , using only .short_sum, return the sum of the first count terms of .Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…