Advertisement
noshin98

coffee

Oct 12th, 2016
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     unsigned long long t,i,j,n,ans=0;
  5.     while(scanf("%llu",&t)==1)
  6.     {
  7.         for(i=1;i<=t;i++)
  8.         {
  9.             scanf("%llu",&n);
  10.             ans=0;
  11.             for(j=1;j<n;j++)
  12.             {
  13.                 if(j%2==0)
  14.  
  15.                 ans=ans+j+j;
  16.  
  17.  
  18.             }
  19.                 printf("%llu\n",ans+n);
  20.  
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement