THE QUESTION
Text from the official booklet. Refer to the PDF for original mathematical notation, formatting, and linked input files. Printed samples and inputs are reproduced as published.
You are a cybersecurity specialist attempting to infiltrate a highly secure data center. The only way to gain access is by sending a data packet through a closed-loop network of servers. A terminal displays a challenge: “This network of servers is configured in a circular topology. To break through the firewall, your data packet must traverse the network n times, collecting information from each server in the process.” Write a Python function transmit_data that takes a list network (of integers, representing data values stored on each server) and an integer n (the number of times the packet must cycle through the network). The function should return the sum of all collected data values after completing n full cycles. Sample Input and Output Input: a = [3, 7, 2, 5] n = 2 Output: 34 Explanation: One full cycle: 3 + 7 + 2 + 5 = 17 Two full cycles: 17 × 2 = 34 Find the output for the following input: Input: a = [-50, -43, 49, 4, 49, -39, -30, 13, 18, 28, 5, -21, -37, 11, 14, -41, 27, 45, 45, 23, -45, 50, -30, -13, 47, 16, -17, 50, 21, -29, 13, -39, 25, -36, 0, -21, -30, -15, 47, -31, 10, 31, -8, -14, 31, -49, -27, -38, -11, 19, -31, 14, -28, 24, 49, 5, 13, -16, 50, -30, -14, 0, 23, -31, 47, -42, 12, -12, -20, -43, 33, 27, -37, -38, -44, 35, 36, 5, -11, 2, 6, -31, 37, -33, 8, -46, 36, -45, 31, 48, -37, -44, 10, -38, 42, -50, 31, -40, 39, -17, -37, 9, -34, -22, 46, -50, -3, 7, 34, -40, -37, 32, -9, -34, 9, 18, 14, 4, 12, -23, -26, 4, -23, 40, 28, -8, 17, -41, -31, -47, -45, -34, -23, -35, -27, 47, -30, -26, -38, 5, 41, 44, 35, -14, -5, -33, -13, 12, -46, 45, 35, 25, -10, 22, 20, 49, -34, 37, 27, -17, -8, 27, -12, 8, 50, -6, -32, 24, -36, -34, -31, -38, 38, 50, -47, 13, 16, 1, -31, -6, -33, 5, 3, -40, -35, -12, 24, -23, 2, -4, -33, 31, -26, 31, -7, 5, 12, 10, 39, -29, 49, -22, -4, -37, 0, 40, 23, 21, 8, -38, -26, -50, -24, -40, 33, -16, -7, 15, -47, -43, -12, 46, 26, -25, 35, -19, -12, 1, 21] n = 215