Skip to content

Instantly share code, notes, and snippets.

@zsrinivas
Created May 26, 2014 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsrinivas/aa73599cb3bedbbed662 to your computer and use it in GitHub Desktop.
Save zsrinivas/aa73599cb3bedbbed662 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <ctype.h>
int main(int argc, char const *argv[])
{
int testc;
long long int n;
scanf("%d", &testc);
while(testc--)
{
scanf("%lld", &n);
printf("%lld\n", ((long long int)n/2)*(n-(long long int)(n/2)));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment