Back to General discussions forum
In this task when obtain the answers are closer but not the same,
This is my code in Python:
mylist="1 1 5 3 5 4"
numbers = [int(s) for s in mylist.split()]
result=[]
for i in range(len(numbers)//3):
X=numeros[i3]
Y=numeros[i3+1]
N=numeros[i3+2]
result.append((NX*Y)//(X+Y))
print(" ".join(map(str,result)))
2 7
And in the example the answer is:
3 9
please one hint
Hi,
For the first test case, 1 1 5, if both printers print 2 pages, that will take 2 seconds. Printing the fifth page will take another second, so the answer must be 3 seconds.
For the second test case, 3 5 4, if the first printer prints 3 pages (taking 9 seconds) and the second printer prints 1 page (taking 5 seconds) the answer is 9 seconds.