function calculateSum(N, numbers) local sum = 0 local result = {} for i = 1, N do sum = sum + math.sqrt(numbers[i]) result[i] = sum end return result end local N = tonumber(io.read()) local numbers = {} for i = 1, N do numbers[i] = tonumber(io.read()) end local results = calculateSum(N, numbers) for i = 1, N do print(string.format("%20f", results[i])) end