Alphabet modulo
Statement
Goal
You get a lowercase character c and a string s. Print s modulo c.Normally the modulo operation is only used for numbers. But you can also use it for characters.
Example: c =
That means that after
a | b | c | d | e | f |
g | h | i | j | k | l |
m | n | o | p | q | r |
s | t | u | v | w | x |
y | z |
Every character becomes the character in the same column in the first row:
Numbers and punctuation are not changed. An uppercase character remains in uppercase, a lowercase character remains in lowercase.
Input
Line 1: A lowercase character c (not "a" )
Line 2: The string s
Line 2: The string s
Output
Line 1: s modulo c
Constraints
1 ≤ Length of s ≤ 500
Length of c = 1
c ≠"a"
Length of c = 1
c ≠
Example
Input
d de
Output
ab
Game modes
Fastest, Shortest, Reverse
Test cases
One character Test
Input
d
de
Output
ab
Validator 1 Validator
Input
d
ef
Output
bc
Alphabet Test
Input
f
abcdefghijklmnopqrstuvwxyz
Output
abcdeabcdeabcdeabcdeabcdea
Validator 2 Validator
Input
g
abcdefghijklmnopqrstuvwxyz
Output
abcdefabcdefabcdefabcdefab
Upper- and lowercase Test
Input
f
Hello World
Output
Cebbe Cecbd
Validator 3 Validator
Input
d
Good Morning
Output
Acca Accbcba
Special characters Test
Input
d
These are examples for characters, you shouldn't replace: !"§$%&/()=?{[]}\+#-.,;:_*'0123456789.
Output
Bbbab acb bcaaacba ccc cbacacbbca, acc abcccab'b cbacacb: !"§$%&/()=?{[]}\+#-.,;:_*'0123456789.
Validator 4 Validator
Input
e
If you replace one of !"§$%&/()=?{[]}\+#-.,;:_*'0123456789, you won't pass the Testcase.
Output
Ab aca baddaca cba cb !"§$%&/()=?{[]}\+#-.,;:_*'0123456789, aca ccb'd dacc dda Dacdcaca.
Input = Output Test
Input
c
aaba
Output
aaba
Validator 5 Validator
Input
c
aabb
Output
aabb
Long text Test
Input
l
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
Output
Adgeb iehjb ddadg hii abei, cdcheieijg hadiehcicg eaiig, hed diab cdcjbc eigbdd
Validator 6 Validator
Input
n
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Output
Ag ieeb ebf eg acchfam eg jhfgb dhb dblbeef eg ea eebhm. Fgeg cliga kafd ghbeegeea, ab fea gakimaga faacghf efg
Solution language
Solution
Stub generator input