import sys from decimal import Decimal, getcontext getcontext().prec = 30 # Set a high precision def main(): input = sys.stdin.read().split() n = int(input[0]) x_list = list(map(int, input[1:n+1])) current_sum = Decimal(0) sums = [] for x in x_list: sqrt_x = Decimal(x).sqrt() current_sum += sqrt_x sums.append(current_sum) for s in sums: s_str = format(s, 'f') # Convert to fixed-point string # Remove trailing zeros and unnecessary decimal point if '.' in s_str: s_str = s_str.rstrip('0').rstrip('.') print(s_str) if __name__ == "__main__": main()