fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int ile, n;
  8. int b, c, d, e,f,g,h;
  9. string zzz = "",sss="";
  10. ile = Convert.ToInt32(Console.ReadLine());
  11. for (int i = 1; i <= ile; i++)
  12. {
  13. string[] z = Console.ReadLine().Split(' ');
  14. n = Convert.ToInt32(z[0]);
  15. if (n == 7)
  16. {
  17. b = Convert.ToInt32(z[1]);
  18. c = Convert.ToInt32(z[2]);
  19. d = Convert.ToInt32(z[3]);
  20. e = Convert.ToInt32(z[4]);
  21. f = Convert.ToInt32(z[5]);
  22. g = Convert.ToInt32(z[6]);
  23. h = Convert.ToInt32(z[7]);
  24. for (int j = n; j > 0; j--)
  25. {
  26. zzz += z[j]+" ";
  27. }
  28. Console.WriteLine(zzz);
  29. }
  30. else if (n == 3)
  31. {
  32. b = Convert.ToInt32(z[1]);
  33. c = Convert.ToInt32(z[2]);
  34. d = Convert.ToInt32(z[3]);
  35. for (int j = n; j > 0; j--)
  36. {
  37. sss += z[j]+" ";
  38. }
  39. Console.WriteLine(sss);
  40. }
  41.  
  42. }
  43. Console.ReadKey();
  44. }
  45. }
Success #stdin #stdout 0s 131648KB
stdin
2
7 1 2 3 4 5 6 7
3 3 2 11
stdout
7 6 5 4 3 2 1 
11 2 3