rengetsu

Timus_1820

Jul 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. //Timus 1820
  2. #include <iostream>
  3. #include <cmath>
  4. using namespace std;
  5. int main()
  6. {
  7.     int n, k;
  8.     cin >> n >> k;
  9.     if(n>k){cout<<n/k+1 + (n-1+n%k)/k;}
  10.     else{cout<<"2";}
  11.     return 0;
  12. }
Add Comment
Please, Sign In to add comment