# [2678\. Number of Senior Citizens](https://leetcode.com/problems/number-of-senior-citizens/) :::spoiler Solution ```cpp= class Solution { public: int countSeniors(vector<string>& details) { int cnt = 0; for (const auto& s : details) { int age = (s[11] - '0') * 10 + (s[12] - '0'); if (age > 60) ++cnt; } return cnt; } }; ``` - T: $O(n)$ - S: $O(1)$ :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up