postfix to infix by nn

for(;r=readline();print(function f(q,p,c){return~(p='+-*/'.indexOf(c=r[--i]))&&(c+=f(p),c=f(p&=2)+c,q>p)?'('+c+')':c}()))i=r[-1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page