while 1:a=eval('abs((%s-%s+5)%%10-5),'*3%tuple(input()*2));print(sum(a)-max(a))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page