Все задачи на 5.10.17 13:00

This commit is contained in:
2017-10-05 13:08:02 +03:00
parent 93746b05d7
commit ca2ca71f63
120 changed files with 2343 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import sys
sys.stdin = open("input.txt", "r")
sys.stdout = open("output.txt", "w")
orig, end = input(), input()
while len(end) > len(orig):
if end[-1] == 'A':
end = end[:-1]
else:
end = end[:-1][::-1]
if orig == end:
print('POSSIBLE')
else:
print('IMPOSSIBLE')