|
|
вернуться в форумWa#14...Please help.Here is code: Послано Search 7 мар 2008 20:22 #include<iostream.h> #include<math.h> int main() { int a1,b1,a2,b2; cin>>a1>>b1>>a2>>b2; if(a2<=a1) cout<<a1; else if(abs(a1-a2)<b1) cout<<a2; else{ while(a1<a2) { a1+=b1; a2-=b2; } if(a1>a2) cout<<a1; else cout<<a2; } return 0; } Where I'm wrong?Please help!Thank in advance!!! * Послано Брэнд 8 мар 2008 00:39 For test "1 4 10 2" right answer is 8. Re: * >> 1 << 10 >> 5 << 8 >> 9, but 8 |
|
|