Coinsquare Interview Question

Logic problems.