Long Division FIXED by hallvabo

x=input();d=x%10;n=9*x+d
v=`x`;m=len(v);i=2
for s in[" "*4+v,"___"+"_"*m+"\n9 | %u"%n]+["  %u0"%d,"- %2u"%(d*9)," __"]*m+["%3u"%d]:print i/3*" ",s;i+=1

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page