tickets[i]:
- the first 10 characters are the phone number;
- the 11th character is the gender: M, F or O;
- the next two characters are the age;
- the last two are the seat number.
Return how many passengers are strictly older than 60.tickets=["5550001122F6114", "5550003344M6007", "5550005566O8801"] → 2
The ages are 61, 60 and 88. Two passengers are over 60: 61 and 88; exactly 60 does not count.
tickets=["9001234567M2503"] → 0
The passenger is 25.
0–9tickets[i][10] is one of M, F, Otickets=["5550001122F6114", "5550003344M6007", "5550005566O8801"]
2
Run checks the first 3 tests in your browser. Submit checks all 80 tests on the server, hidden ones included.