KodaBank Interview Question

Asked me a math question.