def Q(T,Y):E=len(`T`);print'%s\n %d\n+%*d\n %s\n %d'%(''.join([' ',i[0]][len(i)>1]for i in[`sum(map(int,u))`for u in zip(`T`,`Y`.zfill(E))]),T,E,Y,'-'*E,sum([T,Y]))exec("Q(*input());print('\\n');"*5)
(123,456) (1234,78) (1289,345) (123,567) (3458,675)
123 +456 --- 579 11 1234 + 78 ---- 1312 11 1289 + 345 ---- 1634 1 123 +567 --- 690 111 3458 + 675 ---- 4133
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!