Lazy For Complex
All submissions for this problem are available.
Soham has recently learnt the concept of complex numbers. But he finds it very boring to multiply two concept numbers. Hence he decides to code it once and for all so that he can get the result whenever required
The first line contains the first number in the form A+Bi where -100<=A,B<=100 while the second line contains the other number in the same form and same range. If the real part ‘A’ is desired to be negative, then it is preceded by a minus sign such as -A+Bi else no sign is required.
The only line of output has the product of the two inputs
Input: 5+6i -9+7i Output: -87-19i
|Time Limit:||0.190625 - 9.1006 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, CS2, PAS fpc, RUBY, PHP, GO, NODEJS, FORT, JS, PYP3|
Fetching successful submissions
If you are still having problems, see a sample solution here.