solutions: 474A
This commit is contained in:
parent
9bf9ac97b0
commit
08efdec05f
1 changed files with 23 additions and 0 deletions
23
solutions/python/474A.py
Normal file
23
solutions/python/474A.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
shift = input()
|
||||||
|
s = input()
|
||||||
|
|
||||||
|
rows = [
|
||||||
|
"qwertyuiop",
|
||||||
|
"asdfghjkl;",
|
||||||
|
"zxcvbnm,./",
|
||||||
|
]
|
||||||
|
|
||||||
|
construct = ""
|
||||||
|
|
||||||
|
for i in range(len(s)):
|
||||||
|
for j in rows:
|
||||||
|
row = list(j)
|
||||||
|
if s[i] in row:
|
||||||
|
if shift == "R":
|
||||||
|
change = -1
|
||||||
|
else:
|
||||||
|
change = +1
|
||||||
|
|
||||||
|
construct += row[row.index(s[i])+change]
|
||||||
|
|
||||||
|
print(construct)
|
Loading…
Reference in a new issue