#include #include int main() { unsigned long long l, r; unsigned n; scanf("%llu %llu %u", &l, &r, &n); std::vector low(n), high(n); for (unsigned long long i = r, tmp = 0, cnt = 0; l <= i && cnt < n; --i) if (!high[tmp = i%n]) high[tmp] = i, ++cnt; for (unsigned long long i = l, tmp = 0, cnt = 0; i <= r && cnt < n; ++i) if (!low [tmp = i%n]) low [tmp] = i, ++cnt; for (unsigned i = 0; i < n; ++i) if (low[i] && high[i] && low[i] <= high[i]) printf("%llu\n", (high[i] - low[i]) / n + 1); }