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

Sunbro Wrong answer c++ [2] // Problem 1876. Centipede's Morning 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;
}
Alexandr Glagolev(MUCTR 2014) Re: Wrong answer c++ // Problem 1876. Centipede's Morning 12 Sep 2014 19:07
if (39 + 2 * a> 40 + 2 * b)т.к правую ногу полностью обули
ELDVN Re: Wrong answer c++ // Problem 1876. Centipede's Morning 1 Nov 2015 18:10
take maximum of this two:
    ansa=a*2+39;
    ansb=b*2+40;