Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re,sys
- def f(b,r,a,i,n,f,u,c,k):
- d,e,g,m=[0]*30000,0,0,''
- for n in re.finditer('|'.join(r'(?P<%s>%s)'%m for m in[(j,re.escape(l))for j,l in zip('rlidoswen',[r,a,i,n,f,u,c,k,'.'])]),b):
- m+=' '*g+{'r':'e+=1','l':'e-=1','i':'d[e]+=1','d':'d[e]-=1','o':'sys.stdout.write(chr(d[e])),','s':'d[e]=ord(sys.stdin.read(1))','w':'while d[e]:','e':'pass'}.get(n.lastgroup,'')+'\n';g+=n.lastgroup=='w';g-=n.lastgroup=='e'
- try:exec m
- except:d[e]=-1
Advertisement
Add Comment
Please, Sign In to add comment