fork download
  1. import java.util.Scanner;
  2. import java.math.BigInteger;
  3.  
  4. class yay{
  5. public static void main(String[] args){
  6. Scanner input = new Scanner(System.in);
  7. int t = input.nextInt();
  8.  
  9. BigInteger[] arr = new BigInteger[510];
  10. arr[0] = BigInteger.valueOf(1);
  11.  
  12. for(int i = 1; i < 510; i++){
  13. arr[i] = arr[i-1].multiply(BigInteger.valueOf(i));
  14. }
  15.  
  16. for(int i = 1; i <= t; i++){
  17. int n = input.nextInt();
  18. n = n+1;
  19. BigInteger has = arr[n/2].multiply(arr[(n+1)/2]);
  20. System.out.println(has);
  21. }
  22. };
  23.  
  24. };
Success #stdin #stdout 0.1s 2841600KB
stdin
1
2
3


stdout
2