import math

def suma(a, b):
    return a[0] + b[0],a[1] + b[1],a[2] + b[2]

def mult(a, n):
    return a[0] * n,a[1] * n,a[2] * n

def norma(a):
    n = math.sqrt(a[0] * a[0] + a[1] * a[1] + a[2] * a[2])
    return n

r0x = float(input("Ingrese posicion inicial x: "))
r0y = float(input("Ingrese posicion inicial y: "))
r0z = float(input("Ingrese posicion inicial z: "))

fx = float(input("Ingrese la fuerza resultante x: "))
fy = float(input("Ingrese la fuerza resultante y: "))
fz = float(input("Ingrese la fuerza resultante z: "))

m = float(input("Ingrese la masa: "))
t = float(input("Ingrese el tiempo: "))

a = mult((fx,fy,fz), 1 / m)
r = mult(a, t * t / 2)
r = suma((r0x,r0y,r0z), r)
v = mult(a, t)
rapidez = norma(v)
print("La posicion resultante en el tiempo ",
      t, " es (", r[0], ",", r[1], ",", r[2], ")")
print("La rapidez del objeto en el tiempo", t, " es ", rapidez)
