Problem 56: Powerful digit sum

A googol (10100) is a massive number: one followed by one-hundred zeros; 100100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1. Considering natural numbers of the form, ab, where a, b < 100, what is the maximum digital sum? …

Horner’s Rule Polynomials

This program generates 25 polynomials of increasing degree randomly using a Mersenne twister, solves them via Horner’s rule and records runtime. /////////////////////////////////////////////////////////////////////////////// #include <iostream> #include <vector> #include <random> #include <iomanip> #include <chrono> /////////////////////////////////////////////////////////////////////////////// std::vector<int> randIntGen(int count); float randRealGen(void); void polyPrint(float x, std::vector<int> polyVals); void hornersRuleTime(float x, int n, std::vector<int> polyVals); …