Solution to Problem A: Magic Trick
Solution to Problem B: Cookie Clicker Alpha