Created
July 24, 2017 11:19
-
-
Save MohamedTaha98/59aec538a043f6a92bb8037ec4210953 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () { | |
int n, m; | |
cin >> n >> m; | |
int ans = n + (n - 1) / (m - 1); | |
cout << ans; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment