Skip to content

Commit

Permalink
CF2044B Normal Problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicfred committed Dec 16, 2024
1 parent dc987e6 commit c5788b2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions codeforces/cf2044b_normal_problem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Vicfred
# https://codeforces.com/contest/2044/problem/B
# implementation
t = int(input())
for testcase in range(t):
a = input()
b = ""
for ch in reversed(a):
if ch == 'p':
b += 'q'
elif ch == 'q':
b += 'p'
else:
b += 'w'
print(b)

0 comments on commit c5788b2

Please sign in to comment.