ATCoder

AtCoder
IDabc122_b
Time2000ms
Memory256MB
Difficulty
You are given a string $S$ consisting of uppercase English letters. Find the length of the longest _ACGT string_ that is a substring (see Notes) of $S$. Here, a ACGT string is a string that contains no characters other than `A`, `C`, `G` and `T`. ## Constraints * $S$ is a string of length between $1$ and $10$ (inclusive). * Each character in $S$ is an uppercase English letter. ## Input Input is given from Standard Input in the following format: $S$ [samples] ## Notes A substring of a string $T$ is a string obtained by removing zero or more characters from the beginning and the end of $T$. For example, the substrings of `ATCODER` include `TCO`, `AT`, `CODER`, `ATCODER` and (the empty string), but not `AC`.
Samples
Input #1
ATCODER
Output #1
3

Among the ACGT strings that are substrings of `ATCODER`, the longest one is `ATC`.
Input #2
HATAGAYA
Output #2
5

Among the ACGT strings that are substrings of `HATAGAYA`, the longest one is `ATAGA`.
Input #3
SHINJUKU
Output #3
0

Among the ACGT strings that are substrings of `SHINJUKU`, the longest one is (the empty string).
API Response (JSON)
{
  "problem": {
    "name": "ATCoder",
    "description": {
      "content": "You are given a string $S$ consisting of uppercase English letters. Find the length of the longest _ACGT string_ that is a substring (see Notes) of $S$. Here, a ACGT string is a string that contains n",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc122_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ consisting of uppercase English letters. Find the length of the longest _ACGT string_ that is a substring (see Notes) of $S$.\nHere, a ACGT string is a string that contains n...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments