1
0
Fork 0
mirror of https://gitlab.com/mfocko/LeetCode.git synced 2024-09-19 01:36:57 +02:00
LeetCode/java/number-of-senior-citizens.java

16 lines
260 B
Java
Raw Normal View History

class Solution {
public int countSeniors(String[] details) {
int count = 0;
for (String citizen : details) {
var age = Integer.parseInt(citizen.substring(11, 13));
if (age > 60) {
++count;
}
}
return count;
}
}