Codeforces Round #242 (Div. 2) Tutorials and Solutions
A. Squats
Trun x => X
or X => x
to make the number of 'x' is equal to the number of 'X'.
n = int(raw_input())
hamsters = [c for c in raw_input()]
sits = hamsters.count('x')
stands = hamsters.count('X')
if sits == stands:
print 0
print ''.join(hamsters)
else:
if sits > stands …