AKUNA CAPITAL interview question

Sequences, long multiplication and division