Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Compressed solution in Creative category for Digit Stack by nickie
digit_stack=lambda P,S=[]:S.clear()or sum(S.append(int(C[5:]))or 0
if'U'==C[1]else(S or 0)and(S.pop()if'O'==C[1]else S[-1])for C in P)
Sept. 20, 2014