Skip to content

Commit 248951d

Browse files
committed
Create README - LeetHub
1 parent 97c105e commit 248951d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<h2><a href="https://leetcode.com/problems/number-of-senior-citizens">2678. Number of Senior Citizens</a></h2><h3>Easy</h3><hr><p>You are given a <strong>0-indexed</strong> array of strings <code>details</code>. Each element of <code>details</code> provides information about a given passenger compressed into a string of length <code>15</code>. The system is such that:</p>
2+
3+
<ul>
4+
<li>The first ten characters consist of the phone number of passengers.</li>
5+
<li>The next character denotes the gender of the person.</li>
6+
<li>The following two characters are used to indicate the age of the person.</li>
7+
<li>The last two characters determine the seat allotted to that person.</li>
8+
</ul>
9+
10+
<p>Return <em>the number of passengers who are <strong>strictly </strong><strong>more than 60 years old</strong>.</em></p>
11+
12+
<p>&nbsp;</p>
13+
<p><strong class="example">Example 1:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> details = [&quot;7868190130M7522&quot;,&quot;5303914400F9211&quot;,&quot;9273338290F4010&quot;]
17+
<strong>Output:</strong> 2
18+
<strong>Explanation:</strong> 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.
19+
</pre>
20+
21+
<p><strong class="example">Example 2:</strong></p>
22+
23+
<pre>
24+
<strong>Input:</strong> details = [&quot;1313579440F2036&quot;,&quot;2921522980M5644&quot;]
25+
<strong>Output:</strong> 0
26+
<strong>Explanation:</strong> None of the passengers are older than 60.
27+
</pre>
28+
29+
<p>&nbsp;</p>
30+
<p><strong>Constraints:</strong></p>
31+
32+
<ul>
33+
<li><code>1 &lt;= details.length &lt;= 100</code></li>
34+
<li><code>details[i].length == 15</code></li>
35+
<li><code>details[i] consists of digits from &#39;0&#39; to &#39;9&#39;.</code></li>
36+
<li><code>details[i][10] is either &#39;M&#39; or &#39;F&#39; or &#39;O&#39;.</code></li>
37+
<li>The phone numbers and seat numbers of the passengers are distinct.</li>
38+
</ul>

0 commit comments

Comments
 (0)