Long Division FIXED by hallvabo

n=int(input()[:-2]);d=n%9
v=str(n//9);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