cswork / OA打开练习工作台

DuolingoOA #3

Replace Nth Consonant

估计简单可在线判题

考点(AI 标注)字符串

Replace every n-th English consonant in message with the next consonant in alphabetical order; preserve case and leave all other characters unchanged. In the source example output CodeTignam, the uppercase T conflicts with the original lowercase s, the case-preservation rule, and the explanation; this site corrects it to Codetignam according to the written rules and the explanation.

输入格式

Two lines of input: the first line is message (1..200000 ASCII characters, without newlines); the second line is an integer n (1≤n≤200000). Only ASCII A-Z/a-z take part in the consonant check; the vowels are a, e, i, o, u, and y is treated as a consonant; all other ASCII characters are kept as is.

输出格式

Output the entire transformed message line.

样例 1

输入:

Codesignal
3

输出:

Codetignam

样例 2

输入:

bdf
1

输出:

cfg

样例 3

输入:

xyz
1

输出:

yzb