Citadel Securities Interview Question

Solve programming problem in one line