Question d’entretien chez Meta

Can you write a script to solve this problem