9/14 - Python and Math

This week, we'll be doing focusing on learning some Python (if you've never used it before), and some generic math topics that show up a lot in contests.

Python

Math

Delving Deeper

Here's an interesting counting problem that uses modular arithmetic. If you want, take a shot at some approaches for this problem and we (those interested) can talk through it a little bit. You'll need to do your own modular arithmetic research, and as a hint, learn about sequences of the form a^b mod m.

If you're interested in a solution, I've coded one up here. Feel free to give it a shot a let me know if our outputs are mismatching. If you're interested on some of the theory/reasoning behind it, check out this blog post.