Treasure Chest

AtCoder
IDabc299_a
Time2000ms
Memory256MB
Difficulty
You are given a string $S$ of length $N$ consisting of three kinds of characters: `.`, `|`, and `*`. $S$ contains exactly two `|` and exactly one `*`. Determine whether the `*` is between the two `|`, and if so, print `in`; otherwise, print `out`. More formally, determine whether one of the characters before the `*` is `|` and one of the characters after the `*` is `|`. ## Constraints * $3\leq N\leq 100$ * $N$ is an integer. * $S$ is a string of length $N$ consisting of `.`, `|`, and `*`. * $S$ contains exactly two `|`. * $S$ contains exactly one `*`. ## Input The input is given from Standard Input in the following format: $N$ $S$ [samples]
Samples
Input #1
10
.|..*...|.
Output #1
in

Between the two `|`, we have `|..*...|`, which contains `*`, so you should print `in`.
Input #2
10
.|..|.*...
Output #2
out

Between the two `|`, we have `|..|`, which does not contain `*`, so you should print `out`.
Input #3
3
|*|
Output #3
in
API Response (JSON)
{
  "problem": {
    "name": "Treasure Chest",
    "description": {
      "content": "You are given a string $S$ of length $N$ consisting of three kinds of characters: `.`, `|`, and `*`. $S$ contains exactly two `|` and exactly one `*`. Determine whether the `*` is between the two `|`,",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc299_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ of length $N$ consisting of three kinds of characters: `.`, `|`, and `*`. $S$ contains exactly two `|` and exactly one `*`.\nDetermine whether the `*` is between the two `|`,...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments