五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

LeetCode 2678. Number of Senior Citizens

2023-05-15 08:14 作者:您是打尖兒還是住店呢  | 我要投稿

You are given a?0-indexed?array of strings?details. Each element of?details?provides information about a given passenger compressed into a string of length?15. The system is such that:

  • The first ten characters consist of the phone number of passengers.

  • The next character denotes the gender of the person.

  • The following two characters are used to indicate the age of the person.

  • The last two characters determine the seat allotted to that person.

Return?the number of passengers who are?strictly?more than 60 years old.

?

Example 1:

Input: details = ["7868190130M7522","5303914400F9211","9273338290F4010"]

Output: 2

Explanation: The passengers at indices 0, 1, and 2 have ages 75, 92, and 40. Thus, there are 2 people who are over 60 years old.

Example 2:

Input: details = ["1313579440F2036","2921522980M5644"]

Output: 0

Explanation: None of the passengers are older than 60.

?

Constraints:

  • 1 <= details.length <= 100

  • details[i].length == 15

  • details[i] consists of digits from '0' to '9'.

  • details[i][10] is either 'M' or 'F' or 'O'.

  • The phone numbers and seat numbers of the passengers are distinct.

easy題目,計算大于60的人數(shù),根據(jù)題目計算一下即可;

Runtime:?0 ms, faster than?100.00%?of?Java?online submissions for?Number of Senior Citizens.

Memory Usage:?42.4 MB, less than?100.00%?of?Java?online submissions for?Number of Senior Citizens.


LeetCode 2678. Number of Senior Citizens的評論 (共 條)

分享到微博請遵守國家法律
凤凰县| 碌曲县| 宁德市| 阳春市| 临桂县| 广安市| 曲阳县| 库尔勒市| 屏南县| 淄博市| 盱眙县| 建平县| 托克托县| 克什克腾旗| 商丘市| 缙云县| 尚义县| 吴堡县| 东明县| 定襄县| 韩城市| 海丰县| 农安县| 察隅县| 隆回县| 锦州市| 安龙县| 阿尔山市| 琼结县| 缙云县| 荥阳市| 泽普县| 太和县| 安顺市| 吴桥县| 普宁市| 咸宁市| 巴青县| 大城县| 南安市| 陆河县|