Tap here to switch tabs
Problem
Submissions

Problem: Complex Number Multiplication

med
30 min
Try to solve the Complex Number Multiplication problem.

Statement

A complex number can be represented as a string in the form "real+imaginaryi" where real is the real integer part and imaginary is the imaginary integer part, satisfying i2=−1i^2 = -1.

Given two strings num1 and num2 representing two complex numbers, return a string representing their product in the same format.

Constraints:

  • num1 and num2 are valid complex numbers.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Complex Number Multiplication

med
30 min
Try to solve the Complex Number Multiplication problem.

Statement

A complex number can be represented as a string in the form "real+imaginaryi" where real is the real integer part and imaginary is the imaginary integer part, satisfying i2=−1i^2 = -1.

Given two strings num1 and num2 representing two complex numbers, return a string representing their product in the same format.

Constraints:

  • num1 and num2 are valid complex numbers.