BioMind interview question

A math related leetcode problem.