Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:求教高人!只有一点错误!!⑨小弟一命吧!编译器是一摸一样的答案,但是交上来就不一样啦!

Posted by caojingkun886 at 2011-07-14 08:40:39 on Problem 2017
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator