chokudai

AtCoder
IDabc211_c
Time2000ms
Memory256MB
Difficulty
You are given a string $S$. How many ways are there to choose and underline eight of its characters so that those characters read `c`, `h`, `o`, `k`, `u`, `d`, `a`, `i` from left to right? Since the count can be enormous, print it modulo $(10^9 + 7)$. ## Constraints * $8 \leq |S| \leq 10^5$ * $S$ consists of lowercase English letters. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
chchokudai
Output #1
3

We have three valid ways:
chchokudai  
chchokudai  
chchokudai
while the following is invalid:
chchokudai
Input #2
atcoderrr
Output #2
0

The answer may be $0$.
Input #3
chokudaichokudaichokudai
Output #3
45
API Response (JSON)
{
  "problem": {
    "name": "chokudai",
    "description": {
      "content": "You are given a string $S$.   How many ways are there to choose and underline eight of its characters so that those characters read `c`, `h`, `o`, `k`, `u`, `d`, `a`, `i` from left to right?   Since t",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc211_c"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$.  \nHow many ways are there to choose and underline eight of its characters so that those characters read `c`, `h`, `o`, `k`, `u`, `d`, `a`, `i` from left to right?  \nSince t...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments