#include<stdio.h>
int main()
{
int n, k;
while(scanf("%d %d", &n, &k) != EOF)
{
int kase = 0;
int i = 0;
while(n > 0)
{
n--;
kase++;
i++;
if(i == k)
{
i = 0;
n++;
}
}
printf("%d\n", kase);
}
return 0;
}
标签:main,int,++,while,kase,Peter,P1150
来源: https://www.cnblogs.com/White-Raffard/p/15465161.html