You are viewing a single comment's thread. Return to all comments →
x = [''] for s in [input() for _ in range(int(input()))]: x.append(x[-1]+s[2:]) if s[0] == '1' else x.append(x[-1][:-int(s[2:])]) if s[0] == '2' else print(x[-1][int(s[2:])-1]) if s[0] == '3' else x.pop() if s == '4' else ...
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Text Editor
You are viewing a single comment's thread. Return to all comments →