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

Common Board

1820. Ural Steaks
Posted by ajfater 29 Jan 2015 21:45
In the name of who make the worlds
Hello
When I running my code in vb 2010 my code is correct, but when I submit in site, site saying me "wrong answer" with 8 "test#". What's the problem? Is it in my code or on site
my code:

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    //description
    int n , k ;

    //input
    cin >> n >> k ;

    //calculating
    if ( ( ( 2 * n ) % k ) == 0 )
    {
        n = ( 2 * n ) / k ;
    }
    else
    {
        n = ( 2 * n ) / k  ;
        n ++ ;
    }

    //output
    cout << n ;

    //end
    return 0;
}

Thank you
Bye
A.J.Fater