fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int ile, n;
  8. int a, b, c, d, e;
  9. int tmp = 0;
  10. ile = Convert.ToInt32(Console.ReadLine());
  11. for (int i = 1; i <= ile; i++)
  12. {
  13. n = Convert.ToInt32(Console.ReadLine());
  14. string[] z = Console.ReadLine().Split(' ');
  15. for (int j = 0; j < n; j++)
  16. {
  17. a = Convert.ToInt32(z[0]);
  18. b = Convert.ToInt32(z[1]);
  19. c = Convert.ToInt32(z[2]);
  20. d = Convert.ToInt32(z[3]);
  21. e = Convert.ToInt32(z[4]);
  22. }
  23. tmp = 0;
  24. for (int j = 0; j < n; j++)
  25. {
  26. tmp += Convert.ToInt32(z[j]);
  27. }
  28. Console.WriteLine(tmp);
  29. n--;
  30. }
  31. Console.ReadKey();
  32. }
  33. }
Runtime error #stdin #stdout #stderr 0s 135040KB
stdin
2
5
1 2 3 4 5
2
-100 100
stdout
15
stderr
Unhandled Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Test.Main () [0x00054] in <e36fbd2f77234b74b595b8d05b24eae7>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Index was outside the bounds of the array.
  at Test.Main () [0x00054] in <e36fbd2f77234b74b595b8d05b24eae7>:0