import sys from itertools import islice import numpy as np def resolve(in_): N = int(next(in_)) # K = np.fromiter(map(int, islice(in_, N)), np.float64) b = in_.read() K = np.fromstring(b, dtype=np.float128, sep='\n') np.savetxt(sys.stdout, np.add.accumulate(np.sqrt(K, dtype=np.float128), dtype=np.float128), fmt='%.18g', delimiter='\n') def main(): resolve(sys.stdin.buffer) if __name__ == '__main__': main()