J.P. Morgan Interview Question

Maake a loto alogorithm