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

Test 8
Posted by Adil 27 Feb 2014 22:39
Give me please test 8.
Re: Test 8
Posted by Lennox Greenawalt 8 May 2014 09:18
And me too, please. Old 8th test passed correct but that give me a wrong answer error.
Re: Test 8
Posted by matr 18 Jun 2014 07:21
Hint: Think of all possible cases.

Edited by author 18.06.2014 08:01

Edited by author 18.06.2014 08:01
Re: Test 8
Posted by morbidel 18 Jun 2014 18:40
post your code you guys!
Re: Test 8
Posted by Lawrence 23 Jun 2014 18:37
#include <iostream>
using namespace std;
int main()
{
    int n, k;
    cin >> n >> k;
    if (k>n)
        cout << 2;
    else
    {
    if (2*n%k>=1)
        cout << 2*n/k+1;
    else cout << 2*n/k;
    }
    return 0;
}
Check my post for explanation