itim Technology interview question

Unexpected question: some math questions