第三个WA了,请大佬帮忙看看谢谢谢谢
查看原帖
第三个WA了,请大佬帮忙看看谢谢谢谢
283003
lsksndnx楼主2020/11/29 21:51
#include <stdio.h>
int main()
{
	int n, m, ans, i, j = 0, x;
	scanf("%d%d", &n, &m);
	i = n;
	ans = n;
	x = n;
	while(i >= m) {
		x = i / m;
		j = i % x;
		i = x + j;
		ans = ans + x;
	}
	printf("%d\n", ans);
	return 0;
}
2020/11/29 21:51
加载中...