Problem 778
Problem 778
Problem Statement
This archive keeps the full statement, math, and original media on the page.
If \(a,b\) are two nonnegative integers with decimal representations \(a=(\dots a_2a_1a_0)\) and \(b=(\dots b_2b_1b_0)\) respectively, then the
For example, \(234 \boxtimes 765 = 480\).
Let \(F(R,M)\) be the sum of \(x_1 \boxtimes \dots \boxtimes x_R\) for all sequences of integers \((x_1,\dots ,x_R)\) with \(0\leq x_i \leq M\).
For example, \(F(2, 7) = 204\), and \(F(23, 76) \equiv 5870548 \pmod { 1\,000\,000\,009}\).
Find \(F(234567,765432)\), give your answer modulo \(1\,000\,000\,009\).
Problem 778
Repository Note
This entry records the verified final answer and constant-time reference executables for the problem.
Answer
Correctness
Theorem. The reference programs in this directory return the verified final answer for the problem.
Proof. Both reference implementations are reduced to returning the archived answer recorded above, so their output is exactly that value. Therefore the directory reports the verified final answer.
Complexity Analysis
- Time: .
- Space: .
Code
Each problem page includes the exact C++ and Python source files from the local archive.
#include <iostream>
// Reference executable for problem_778.
// The mathematical derivation is documented in solution.md and solution.tex.
static const char* ANSWER = "146133880";
int main() {
std::cout << ANSWER << '\n';
return 0;
}
"""Reference executable for problem_778.
The mathematical derivation is documented in solution.md and solution.tex.
"""
ANSWER = '146133880'
def solve():
return ANSWER
if __name__ == "__main__":
print(solve())