May
31
Python 21 days of Code Golf
Greetings!! Here's a series of Cold Golf problems and solutions in Python as a part of 21 days of Code | Code Golf by Skillenza
https://skillenza.com/challenge/21days-of-code
DAY - I
A Little Complex
Given n complex numbers each x + yi, where x is the real part and y is the imaginary part, find their product.
Input Format
The first line of input consists of an integer t denoting the number of test cases. t test cases follow. The first line of each test case consists of an integer n denoting the number of complex numbers. Following n lines of the test case consists of two integers x and y separated by a space denoting x + yi.
Output Format
For each test case, output the product of the complex numbers. Each product is in the form p and q space separated denoting p + qi.
https://skillenza.com/challenge/21days-of-code
DAY - I
A Little Complex
Given n complex numbers each x + yi, where x is the real part and y is the imaginary part, find their product.
Input Format
The first line of input consists of an integer t denoting the number of test cases. t test cases follow. The first line of each test case consists of an integer n denoting the number of complex numbers. Following n lines of the test case consists of two integers x and y separated by a space denoting x + yi.
Output Format
For each test case, output the product of the complex numbers. Each product is in the form p and q space separated denoting p + qi.