MBTI
Time limit1sMemory limit512 MB
Given Jinho's MBTI type and N friends' types, count how many friends share Jinho's type.
- Level
Easy1 of 10
- Topics
- Implementation, String
- Solved
- No attempts yet
Problem
Jinho has been interested in MBTI, a personality test that has become popular lately. MBTI sorts people along four scales, and a person is assigned one of types.
- Introversion (I) / Extraversion (E)
- Intuition (N) / Sensing (S)
- Feeling (F) / Thinking (T)
- Perceiving (P) / Judging (J)
The full list of types is INFP, ENFP, ISFP, ESFP, INTP, ENTP, ISTP, ESTP, INFJ, ENFJ, ISFJ, ESFJ, INTJ, ENTJ, ISTJ, ESTJ.
Jinho asked friends for their MBTI types. How many of them have the same type as Jinho?
Input
The first line contains Jinho's MBTI type.
The second line contains the number of friends ().
The next lines contain the MBTI types of the friends.
Output
Print the number of friends whose MBTI type is the same as Jinho's.