fork download
  1. using System;
  2.  
  3. public static class Test
  4. {
  5. public static void Main()
  6. {
  7. int T = int.Parse(Console.ReadLine());
  8. for (int i = 0; i < T; i++)
  9. {
  10. int N = int.Parse(Console.ReadLine());
  11. Console.WriteLine(1 + (N * (N + 1) / 2));
  12. }
  13. }
  14. }
Success #stdin #stdout 0.02s 24348KB
stdin
2
1
2
stdout
2
4