Pergunta de entrevista da empresa T-Mobile

Calculate customer number with given conditions.