-1
Well, I made the following code, which is based on two vectors of size N that, multiplying the values of same Dice form a third vector resulting from this multiplication.
n = int(input(''))
vetor1 = []
vetor2 = []
resultante = []
for vet in range(n):
if n >=1 and n <= 100:
vetor1.append(int(input()))
for vet in range(n):
if n >=1 and n <= 100:
vetor2.append(int(input()))
resultante = [elemvetor1 * elemvetor2 for elemvetor1, elemvetor2 in zip(vetor1, vetor2)]
resultantef =' '.join(str(v) for v in resultante)
print(resultantef)
The problem arises from my input, since the N values of vector 1 need to be on a line and the N values of vector 2 need to be on a second line. Here is an example of the input for the output:
#entrada
5 #tamanho dos vetores 1 e 2
1 3 2 4 5 #valores do vetor1
6 8 9 7 6 #valores do vetor 2
#saída
6 24 18 28 30 #vetor3 resultante das multiplicações de mesmo indice entre vetor1 e vetor2
Does that answer your question? https://stackoverflow.com/questions/23253863/how-to-input-2-integers-in-one-line-in-python
– Vitor Ceolin
@Vitorceolin I tested here as said in the question q you linked, it did not work.
– Gabriel Schrader