poj2509
简单题
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
using namespace std;
int main()
{
//freopen("D:\\t.txt", "r", stdin);
int n, k;
while (scanf("%d%d", &n, &k) != EOF)
{
int ans = n + (n / (k - 1));
if (n % (k - 1) == 0)
ans--;
printf("%d\n", ans);
}
return 0;
}