AcCepted

AtCoder
IDabc104_b
Time2000ms
Memory256MB
Difficulty
You are given a string $S$. Each character of $S$ is uppercase or lowercase English letter. Determine if $S$ satisfies all of the following conditions: * The initial character of $S$ is an uppercase `A`. * There is exactly one occurrence of `C` between the third character from the beginning and the second to last character (inclusive). * All letters except the `A` and `C` mentioned above are lowercase. ## Constraints * $4 ≤ |S| ≤ 10$ ($|S|$ is the length of the string $S$.) * Each character of $S$ is uppercase or lowercase English letter. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
AtCoder
Output #1
AC

The first letter is `A`, the third letter is `C` and the remaining letters are all lowercase, so all the conditions are satisfied.
Input #2
ACoder
Output #2
WA

The second letter should not be `C`.
Input #3
AcycliC
Output #3
WA

The last letter should not be `C`, either.
Input #4
AtCoCo
Output #4
WA

There should not be two or more occurrences of `C`.
Input #5
Atcoder
Output #5
WA

The number of `C` should not be zero, either.
API Response (JSON)
{
  "problem": {
    "name": "AcCepted",
    "description": {
      "content": "You are given a string $S$. Each character of $S$ is uppercase or lowercase English letter. Determine if $S$ satisfies all of the following conditions: *   The initial character of $S$ is an uppercas",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc104_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$. Each character of $S$ is uppercase or lowercase English letter. Determine if $S$ satisfies all of the following conditions:\n\n*   The initial character of $S$ is an uppercas...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments