import sys from decimal import Decimal, getcontext def main(): getcontext().prec = 40 # Set the precision to a high enough value n = int(sys.stdin.readline()) sum_sqrt = Decimal(0) results = [] for _ in range(n): x = int(sys.stdin.readline()) sqrt_x = Decimal(x).sqrt() sum_sqrt += sqrt_x results.append(sum_sqrt) # Formatting each result to 16 decimal places for s in results: # Convert to string, split into integer and decimal parts s_str = format(s, 'f') if '.' in s_str: integer_part, decimal_part = s_str.split('.') decimal_part = (decimal_part + '0' * 16)[:16] # Pad with zeros if needed, take first 16 digits else: integer_part, decimal_part = s_str, '0' * 16 # Ensure that the output has exactly 16 decimal places formatted = f"{integer_part}.{decimal_part}" print(formatted) if __name__ == "__main__": main()