CashKaro.com Interview Question

logic base question