Post History
Multiply complex numbers. 2 space-seperated ones will be input, as follows: (update: you can replace i with j or some other symbol if needed) a+bi -a+bi a-bi -a-bi where a and b are integers ...
#7: Post edited
- Multiply complex numbers. 2 space-seperated ones will be input,
as follows:- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
(update: you can replace i with j or some other symbol if needed)- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows: (update: you can replace i with j or some other symbol if needed)
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#6: Post edited
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
(update: you can replace i with j if needed)- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- (update: you can replace i with j or some other symbol if needed)
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#5: Post edited
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- (update: you can replace i with j if needed)
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#4: Post edited
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- `3+4i 4-5i` -> `8-31i`- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `32+1i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#3: Post edited
Multiply complex numbers.
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
For those unfamiliar: i is the imaginary constant, the value of sqrt(-1), and a complex number is the sum of a real number and an imaginary number.- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `8-31i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: \$i\$ is the imaginary constant, the value of \$\sqrt{-1}\$, and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `8-31i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#2: Post edited
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: i is the imaginary constant, the value of sqrt(-1), and a complex number is the sum of a real number and an imaginary number.
Shortest code following the rules wins.
- Multiply complex numbers. 2 space-seperated ones will be input,
- as follows:
- `a+bi`
- `-a+bi`
- `a-bi`
- `-a-bi`
- where a and b are integers written in base 10.
- You are expected to output in the same format.
- For those unfamiliar: i is the imaginary constant, the value of sqrt(-1), and a complex number is the sum of a real number and an imaginary number.
- Shortest code following the rules wins.
- EDIT: test cases:
- - `3+4i 4-5i` -> `8-31i`
- - `-4+9i 2-2i` -> `10+26i`
- - `-4+9i 2+2i` -> `-26+10i`
- - `-3+0i 10+0i` -> `-30+0i`
- - `0+1i 0+1i` -> `-1+0i`
#1: Initial revision
Multiply complex numbers.
Multiply complex numbers. 2 space-seperated ones will be input, as follows: `a+bi` `-a+bi` `a-bi` `-a-bi` where a and b are integers written in base 10. You are expected to output in the same format. For those unfamiliar: i is the imaginary constant, the value of sqrt(-1), and a complex number is the sum of a real number and an imaginary number. Shortest code following the rules wins.