Skip to content

Commit e26ff97

Browse files
authoredOct 23, 2023
feat: add ts solution to lc problem: No.2678 (#1867)
1 parent 64f4426 commit e26ff97

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
 

‎solution/2600-2699/2678.Number of Senior Citizens/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ function countSeniors(details: string[]): number {
167167
}
168168
```
169169

170+
```ts
171+
function countSeniors(details: string[]): number {
172+
return details.filter(v => parseInt(v.slice(11, 13)) > 60).length;
173+
}
174+
```
175+
170176
### **...**
171177

172178
```

‎solution/2600-2699/2678.Number of Senior Citizens/README_EN.md

+6
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ function countSeniors(details: string[]): number {
157157
}
158158
```
159159

160+
```ts
161+
function countSeniors(details: string[]): number {
162+
return details.filter(v => parseInt(v.slice(11, 13)) > 60).length;
163+
}
164+
```
165+
160166
### **...**
161167

162168
```

0 commit comments

Comments
 (0)