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:l>h不一定会be killed.考虑rope失效时,l=0,或者足够大时,人直接跳下,只要h在合理范围,不会be killedIn Reply To:为什么我的程序不对?wa Posted by:yaya at 2005-10-04 17:40:05 > #include<iostream> > using namespace std; > double k,l,h,w; > int main() > { > cin>>k>>l>>h>>w; > while(k&&l&&h&&w) > { > double a=w*10*5; > double b=w*9.81*h; > double c=(h-l)*(h-l)*k/2; > if(((a+c)<b)||(l>=h)) > cout<<"Killed by the impact."<<endl; > else if((b>=c)) > { > cout<<"James Bond survives."<<endl; > } > else > cout<<"Stuck in the air."<<endl; > cin>>k>>l>>h>>w; > } > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator