Derivative by nn

for(;l=readline();print(o||0))for(o='';t=/(.?\d*)x(\^(.[^-+]*))?/g(l);o+=b?(a-1?~a?a:'-':'')+(--b-1?'x^'+b:'x'):a)[,a,,b]=t,a=(a*5||a+5)*(b||1)/5,a>0?o+=o&&'+':0

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

download

return to the top page