ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1876. Centipede's Morning

Wrong answer c++
Posted by Sunbro 23 May 2014 22:28
#include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (39+2*a>a+2*b) cout << 39+2*a;
else;cout << 40+2*b;
return 0;
}
Re: Wrong answer c++
Posted by Alexandr Glagolev(MUCTR 2014) 12 Sep 2014 19:07
if (39 + 2 * a> 40 + 2 * b)т.к правую ногу полностью обули
Re: Wrong answer c++
Posted by ELDVN 1 Nov 2015 18:10
take maximum of this two:
    ansa=a*2+39;
    ansb=b*2+40;