#AT2446. B - Cat
B - Cat
当前没有测试数据。
B - Cat
Score : $200$ points
Problem Statement
You are given a string $S$ of length $N$.
Find the string obtained by replacing all contiguous occurrences of na
in $S$ with nya
.
Constraints
- $N$ is an integer between $1$ and $1000$, inclusive.
- $S$ is a string of length $N$ consisting of lowercase English letters.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
4
naan
nyaan
Replacing all contiguous occurrences of na
in naan
with nya
results in the string nyaan
.
4
near
near
$S$ may not contain a contiguous na
.
8
national
nyationyal