|
|
back to boardTest 8 Posted by Adil 27 Feb 2014 22:39 Give me please test 8. Re: Test 8 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 post your code you guys! Re: Test 8 #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 |
|
|