Yay!

AtCoder
IDabc342_a
Time2000ms
Memory256MB
Difficulty
You are given a string $S$ consisting of lowercase English letters. The length of $S$ is between $3$ and $100$, inclusive. All characters but one of $S$ are the same. Find $x$ such that the $x$\-th character of $S$ differs from all other characters. ## Constraints * $S$ is a string of length between $3$ and $100$, inclusive, consisting of two different lowercase English letters. * All characters but one of $S$ are the same. ## Input The input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
yay
Output #1
2

The second character of `yay` differs from the first and third characters.
Input #2
egg
Output #2
1
Input #3
zzzzzwz
Output #3
6
API Response (JSON)
{
  "problem": {
    "name": "Yay!",
    "description": {
      "content": "You are given a string $S$ consisting of lowercase English letters. The length of $S$ is between $3$ and $100$, inclusive. All characters but one of $S$ are the same. Find $x$ such that the $x$\\-th ch",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc342_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ consisting of lowercase English letters. The length of $S$ is between $3$ and $100$, inclusive.\nAll characters but one of $S$ are the same.\nFind $x$ such that the $x$\\-th ch...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments