fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int test, ile;
  8. int[] tablica;
  9.  
  10. test = Convert.ToInt32(Console.ReadLine());
  11. for (int i=0; i< test; i++)
  12. {
  13. ile = Convert.ToInt32(Console.ReadLine());
  14. tablica = new int[ile];
  15. for (int j = 0; j < ile; j++)
  16. {
  17. tablica[j] = Convert.ToInt32(Console.ReadLine());
  18. }
  19. for (int j=0; j<ile; j++)
  20. {
  21. if (j%2 != 0)
  22. {
  23. Console.Write(tablica[j]+" ");
  24. }
  25. }
  26. for (int j = 0; j < ile; j++)
  27. {
  28. if (j%2 == 0)
  29. {
  30. Console.Write(tablica[j]+" ");
  31. }
  32. }
  33. } // your code goes here
  34. }
  35. }
Runtime error #stdin #stdout #stderr 0.05s 27000KB
stdin
2 
4 1 2 3 5
3 9 8 7 
stdout
Standard output is empty
stderr
Unhandled Exception:
System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber (System.String str, NumberStyles options, System.NumberBuffer& number, System.Globalization.NumberFormatInfo info, Boolean parseDecimal) [0x00000] in <filename unknown>:0 
  at System.Number.ParseInt32 (System.String s, NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00000] in <filename unknown>:0 
  at System.Int32.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.String value) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber (System.String str, NumberStyles options, System.NumberBuffer& number, System.Globalization.NumberFormatInfo info, Boolean parseDecimal) [0x00000] in <filename unknown>:0 
  at System.Number.ParseInt32 (System.String s, NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00000] in <filename unknown>:0 
  at System.Int32.Parse (System.String s, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.String value) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0