Company: Goldman_Sachs_12nov
Difficulty: medium
Problem Description You are a quality inspector compiling a batch report for a factory's assembly line. Each row of the report holds five values: - The first three columns (A, B, and C) are inspection scores from three separate checks. - The fourth column (D) is a line-specific weight factor. - The fifth column (E) is the overall batch score, which may be absent. A missing E is shown as '-1'. The overall batch score is calculated using the formula: Overall batch score (E) = Sum of first three columns (A + B + C) x Weight factor (D) Your task is to write a program that processes N rows of data given as input. For every row whose overall batch score (E) is missing, compute it with the formula above. Print all computed values in the order they appear in the input. Read the input from STDIN and print the output to STDOUT. Do not print any extra text anywhere in the program, since it would be counted as part of the output and cause the test cases to fail. Constraints 1 <= N <= 10000 1