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 1820. Ural Steaks

Wrong answer Test 14
Posted by BUTKO_VNU 8 Jan 2013 20:22

#include <iostream>


using namespace std;
int main()
{
   int a,b,i=0,x=0,y=0;
   cin>>a>>b;

       while(x+b<=a)
       {
           x=x+b;
           i++;
       }
       y=a-x;
       if(y>0)
       {
            i++;
       }
       while((y+b)<a)
       {
            y=y+b;
            i++;
       }
       i++;

   cout<<i;


return 0;

}
Re: Wrong answer Test 14
Posted by Алексей 5 May 2013 04:09
С дуба рухнул что ле?))