There was an error while loading. Please reload this page.
1 parent 26151f9 commit 100b63fCopy full SHA for 100b63f
1 file changed
leetcode3/최민지/537.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def complexNumberMultiply(self, num1: str, num2: str) -> str:
3
+ real1, imag1 = map(int, num1[:-1].split("+"))
4
+ real2, imag2 = map(int, num2[:-1].split("+"))
5
+ result1 = real1 * real2 - imag1 * imag2
6
+ result2 = real1 * imag2 + imag1 * real2
7
+ return str(result1) + "+" + str(result2) + "i"
8
+
0 commit comments