Question d’entretien chez Bending Spoons

logic problems, algorithm questions involving loops