Project Euler #116: Red, green or blue tiles

  • + 0 comments

    Look up matrix exponentiation. Learn how to find the n-th term of a linear recurrence in O(log n) time.