[Exam Problem] C# Basics Sum of Elements
Здравейте, реших задачата, като уж минава всички тестове, но в системата за оценяване ми дава 58 точки и Runtime error. Това е условието:
You are given n numbers. Find an element that is equal to the sum of all of the other elements.
Input
Input data should be read from the console.
At the only line in the input a sequence of integers stays (numbers separated one from another by a space).
The input data will always be valid and in the format described. There is no need to check it explicitly.
Output
The output data must be printed on the console. At the only line of the output print the result.
Print "Yes, sum=…" if there is an element that is equal to the sum of all other elements, along with this sum.
Print "No, diff=…" if there is no element that is equal to the sum of all other elements. Print also the minimum possible difference between an element from the sequence and the sum of all other elements (always a positive number).
А това е моят код:
http://pastebin.com/L8GMzPbi