T-Mobile Interview Question

Calculate customer number with given conditions.