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 |
Re:求教高人!只有一点错误!!⑨小弟一命吧!编译器是一摸一样的答案,但是交上来就不一样啦!In Reply To:求教高人!只有一点错误!!⑨小弟一命吧!编译器是一摸一样的答案,但是交上来就不一样啦! Posted by:caojingkun886 at 2011-07-13 19:50:10 > #include<stdio.h> > main() > { > int i,n,s,t,v,temp; > scanf("%d",&n); > while(n!=-1)//n不为负数 > { > s=temp=0; > for(i=0;i<n;i++) > {scanf("%d %d",&v,&t);s=s+v*(t-temp); temp=t;} > printf("%d miles",s); > } > > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator