| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
注意到a=(x)(x+1)和b=(x+2)(x+3)都是偶数,a和b中一定有一个4的倍数,然后用int就完事了
scanf("%d",&x);
a=(x*(x+1))>>1;
b=((x+2)*(x+3))>>1;
if (a&1)
b>>=1;
else
a>>=1;
printf("%d %d %d\n",t,x,a*b);
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator