|
|
back to boardGive me please test 8. And me too, please. Old 8th test passed correct but that give me a wrong answer error. post your code you guys! #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 Hint: Think of all possible cases. Edited by author 18.06.2014 08:01 Edited by author 18.06.2014 08:01 |
|
|