11403 - Binary Multiplication
Posted: Tue Jan 22, 2008 11:19 pm
I've got many WAs on this problem, would you please take a look at my code????
input:
Output:
Code: Select all
// removed
Code: Select all
101010111 101011
101 1
1 101
11111 1111
111111111111111111111111111111 111111111111111111111111111111
1 1
Code: Select all
101010111
101011
---------
101010111
101010111
000000000
101010111
000000000
101010111
--------------
11100110011101
101
1
---
101
---
101
1
101
---
1
0
1
---
101
11111
1111
-----
11111
11111
11111
11111
---------
111010001
111111111111111111111111111111
111111111111111111111111111111
------------------------------
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
111111111111111111111111111111
------------------------------------------------------------
111111111111111111111111111110000000000000000000000000000001
1
1
-
1
-
1