Coinsquare interview question

Logic problems.