← 返回 meta 的题目列表Friend Request Problem
类型:online_judge
A website has many users. Users can send friend requests to each other. User A can send a friend request to User B if: 1. User B's age is greater than half of User A's age plus 7. 2. User B's age is less than or equal to User A's age. 3. User B's age is between the half of User A's and the double of User A's age, and both ages are greater than 100. Given a list of ages, return the total number of friend requests sent on the site in a given time period.
Example
Input
[16, 16]
Output
2