国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
肃宁县| 荥阳市| 农安县| 南川市| 甘肃省| 郴州市| 松江区| 突泉县| 蓝田县| 固始县| 吕梁市| 同江市| 喀什市| 桃源县| 翼城县| 顺昌县| 平安县| 孟津县| 尉犁县| 商水县| 轮台县| 孟村| 邓州市| 扎兰屯市| 天水市| 东至县| 淳化县| 牡丹江市| 重庆市| 大兴区| 永新县| 天全县| 东光县| 青浦区| 扶沟县| 万宁市| 波密县| 沙湾县| 财经| 卢龙县| 乌拉特中旗|