Remotasks Interview Question

A Medium-Level Maths Codeforces Problem.