eolymp
bolt
Try our new interface for solving problems
Problems

Binary Multiplication

Binary Multiplication

\includegraphics{https://static.e-olymp.com/content/43/43fdac7aa1c9c8d2a7cda4739ba0028ac78d3de1.jpg} All of us know simple multiplication rule. Can we make a program to multiply two binary numbers? Well we can try. \InputFile Each case will define two binary strings (\textbf{x} & \textbf{y}). You can assume that length of each string will not exceed \textbf{30}. The program will terminate with a \textbf{0} \textbf{0}. \OutputFile Output must be formatted like the following examples. You have to show the step by step procedure for the multiplication. Each result will be separated by an empty line.
Time limit 1 second
Memory limit 64 MiB
Input example #1
11 11
111 10
10 111
0 0
Output example #1
  11
  11
  --
  11
 11
----
1001

 111
  10
 ---
 000
111
----
1110

  10
 111
 ---
  10
 10
10
----
1110