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 9 - help pls
Posted by Tom 4 Aug 2011 04:27
Why is it wrong ?
i dont get it :<
help pls: )

greetings
---------------------

#include<iostream>

using namespace std;

int main(){
    int n, k;
    cin >> n >> k;
    n=2*n;
    if(2*k>n) n=k;
    else{
         if(n%k==0) n=n/k;
         else n= n/k + 1;
         }
    cout << n;
    getchar();getchar();
}
Re: wrong answer - test 9 - help pls
Posted by Pk.95[PTS_Obninsk] 30 Dec 2011 12:03
try test n=2 k = 4, good answer at this test - 2