Optiver Interview Question

Solving a data transferring problem (more like a math problem) by coding.