PayPay interview question

Solve an assignment given some data