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 |
好水的题啊#include<cstdio> int main() { int T; scanf("%d",&T); for(int i=1;i<=T;++i) { if(i!=1)printf("\n"); long long a,b; scanf("%lld%lld",&a,&b); long long plus=b+a; long long num=b-a+1; printf("Scenario #%d:\n%lld\n",i,plus*num/2); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator