Back to task

144 symbols haskell
Mon Mar 16 06:15:32 2015 YoshikuniJujo
main=interact$show.r.sum.map(r.read).words
r(-30)= -13
r n=(*signum n).f.reverse.t$abs n
t 0=[]
t n=n`mod`10:t(n`div`10)
f[]=0
f(n:ns)=n+10*f ns


Leave a comment

Parsed as Markdown

Login to leave a comment