Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces Round 460A
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, m, answ=0, ch=0;
- cin >> n >> m;
- while(n)
- {
- ch++;
- answ++;
- n--;
- if(ch%m==0){n++;}
- }
- cout << answ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement