fork download
  1. t = int(input())
  2. for i in range(t):
  3. s = input().split()
  4. v1 = int(s[0])
  5. v2 = int(s[1])
  6. v = (2*v1*v2)/(v1+v2) # wzor ten jest przeksztalceniem wzoru V średnia = całkowita droga / całkowity czas
  7. print(int(v))
  8.  
Success #stdin #stdout 0.02s 27712KB
stdin
2
50 50
60 40
stdout
50
48