Compute required output to recover 10% investment | Capital One Interview Question