102990: [Atcoder]ABC299 A - Treasure Chest

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:13 Solved:0

Description

Score : $100$ points

Problem Statement

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$

Output

Print a single line containing in if the * is between the two |, and out otherwise.


Sample Input 1

10
.|..*...|.

Sample Output 1

in

Between the two |, we have |..*...|, which contains *, so you should print in.


Sample Input 2

10
.|..|.*...

Sample Output 2

out

Between the two |, we have |..|, which does not contain *, so you should print out.


Sample Input 3

3
|*|

Sample Output 3

in

Input

题意翻译

长度为 $N$ 的字符串 $S$ 由三种字符 `.` `|` `*` 组成,保证字符 `|` 在 $S$ 中出现 $2$ 次,字符 `*` 在 $S$ 中出现 $1$ 次。输入 $N$ 和 $S$,你需要判断字符 `*` 是否在两个 `|` 之间。如果在,输出 `in`,否则输出 `out`。 $3\le N\le 100$

Output

分数:100分 部分 问题描述 给你一个长度为 N 的字符串 S,由三种字符组成:.、| 和 *。S 中恰好有两个 | 和一个 *。 确定 * 是否在两个 | 之间,如果是,则打印 in;否则,打印 out。 更正式地说,确定 * 之前的一个字符是否为 |,以及 * 之后的一个字符是否为 |。 部分 约束条件 $3\leq N\leq 100$ N 是一个整数。 S 是一个长度为 N 的字符串,由 .、| 和 * 组成。 S 中恰好有两个 |。 S 中恰好有一个 *。 部分 输入 输入通过标准输入给出以下格式: $N$ $S$ 部分 输出 如果 * 在两个 | 之间,则打印一行 in,否则打印 out。 部分 样例输入 1 10 .|..*...|. 部分 样例输出 1 in 在两个 | 之间,我们有 |..*...|,其中包含 *,因此你应该打印 in。 部分 样例输入 2 10 .|..|.*... 部分 样例输出 2 out 在两个 | 之间,我们有 |..|,其中不包含 *,因此你应该打印 out。 部分 样例输入 3 3 |*| 部分 样例输出 3 in

HINT

判断*是否在两个|之间?

加入题单

算法标签: