n-th term divisible by a, b or c (#461) - Azerbaijan Computing Olympiad