You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/fishercoder/solutions/_537.java
-21
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,6 @@
2
2
3
3
importjava.util.stream.Stream;
4
4
5
-
/**
6
-
* 537. Complex Number Multiplication
7
-
*
8
-
* Given two strings representing two complex numbers.
9
-
10
-
You need to return a string representing their multiplication. Note i2 = -1 according to the definition.
11
-
12
-
Example 1:
13
-
Input: "1+1i", "1+1i"
14
-
Output: "0+2i"
15
-
Explanation: (1 + i) * (1 + i) = 1 + i2 + 2 * i = 2i, and you need convert it to the form of 0+2i.
16
-
17
-
Example 2:
18
-
Input: "1+-1i", "1+-1i"
19
-
Output: "0+-2i"
20
-
Explanation: (1 - i) * (1 - i) = 1 + i2 - 2 * i = -2i, and you need convert it to the form of 0+-2i.
21
-
22
-
Note:
23
-
The input strings will not have extra blank.
24
-
The input strings will be given in the form of a+bi, where the integer a and b will both belong to the range of [-100, 100]. And the output should be also in this form.
0 commit comments