|| ||Code Submission Evaluation System
CSES - HIIT Open 2016
HIIT Open 2016
|Contest start:||2016-05-28 11:00:00|
|Contest end:||2016-05-28 16:00:00|
Task list | Submit code | Submissions | Messages | Scoreboard | Statistics
You are given a string that consists of letters A..Z.
Your task is to remove all but four letters, so that the remaining letters form the word "HIIT". You cannot change the order of the letters.
How many ways there are to do this?
The first input line contains an integer $t$: the number of test cases.
After this, $t$ lines follow. Each line contains a string of $n$ letters.
For each test case, output the number of ways to form the word "HIIT".
- $1 \le t \le 100$
- $1 \le n \le 10^5$
- the sum of all $n$ values is at most $10^6$