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

Adil Test 8 [4] // Problem 1820. Ural Steaks 27 Feb 2014 22:39
Give me please test 8.
Lennox Greenawalt Re: Test 8 [2] // Problem 1820. Ural Steaks 8 May 2014 09:18
And me too, please. Old 8th test passed correct but that give me a wrong answer error.
morbidel Re: Test 8 [1] // Problem 1820. Ural Steaks 18 Jun 2014 18:40
post your code you guys!
Lawrence Re: Test 8 // Problem 1820. Ural Steaks 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
matr Re: Test 8 // Problem 1820. Ural Steaks 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