File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
# [ Problem 2678: Number of Senior Citizens] ( https://leetcode.com/problems/number-of-senior-citizens/description/?envType=daily-question )
2
2
3
3
## Initial thoughts (stream-of-consciousness)
4
+ - This problem is trivial-- we can just return ` sum([int(x[-4:-2]) > 60 for x in details]) `
4
5
5
6
## Refining the problem, round 2 thoughts
7
+ - Nothing to refine...
6
8
7
9
## Attempted solution(s)
8
10
``` python
9
- class Solution : # paste your code here!
10
- ...
11
+ class Solution :
12
+ def countSeniors (self , details : List[str ]) -> int :
13
+ return sum ([int (x[- 4 :- 2 ]) > 60 for x in details])
11
14
```
15
+ - Submitting...
16
+
17
+ ![ Screenshot 2024-07-31 at 8 17 53 PM] ( https://github.com/user-attachments/assets/1ae0bd93-96a5-4c70-9e36-15575eb1ecf0 )
18
+
19
+ Solved!
You can’t perform that action at this time.
0 commit comments