Використана Література
Project Euler. Problem 289. Доступно за: [URL]
Knuth, D. E. The Art of Computer Programming, Volume 1: Fundamental Algorithms. Addison-Wesley, 1997.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. Introduction to Algorithms. MIT Press, 2009.