SOLVE
LATER
Vanya is back with yet another task for you, and this time out, she has tried to make it more interesting for you. So, this is how it goes:
Vanya has some students studying in her class. For each students, she gives you 3 pieces of information, i.e their Name, ID and Age.
Now, considering you have been given this information, Vanya needs to know from you the number of ways she can select 2 distinct students, such that they share the same age. Can you help her out ?
Table : Students
Field | Type |
---|---|
Name | text |
ID | text |
Age | int |
Name | ID | Age |
---|---|---|
Micro | 12abcd | 2 |
Vasya | 13abcd | 2 |
Rhezo | 14abcd | 2 |
Fredo | 15abcd | 3 |
Shino | 16abcd | 3 |
answer |
---|
4 |
\( 1 \le Age \le 10 \)
\( 1 \le | Name, ID | \le 20 \)
The ways Vanya can select 2 students sharing the same age is :
(Vasya,Rhezo)
(Vasya,Micro)
(Rhezo,Micro)
(Fredo,Shino)
So, the answer is 4.