Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- unsigned long long t,i,j,n,ans=0;
- while(scanf("%llu",&t)==1)
- {
- for(i=1;i<=t;i++)
- {
- scanf("%llu",&n);
- ans=0;
- for(j=1;j<n;j++)
- {
- if(j%2==0)
- ans=ans+j+j;
- }
- printf("%llu\n",ans+n);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement