c语言题求做

日期:2014-05-29 15:32:42 人气:1

c语言题求做

#include int main() { int T, n, m, sum; scanf("%d", &T); while (T--) { scanf("%d%d", &n, &m); sum = n; while (n >= m) { sum += n / m; n = n / m + n % m; } printf("%d\n", sum); }}
    A+
热门评论