// yukicoder: 836 じょうよ // 2019.6.15 bal4u #include #include #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif long long in() // 非負整数の入力 { long long n = 0; int c = gc(); // while (isspace(c)) c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } void out(char *s, long long n) // 非負整数の表示(出力) { int i; char b[50]; if (!n) *s++ = '0'; else { i = 0; while (n) b[i++] = n % 10 + '0', n /= 10; while (i--) *s++ = b[i]; } *s++ = '\n'; *s = 0; } void outs(char *s) { while (*s) pc(*s++); } char e[100005], f[100005]; char tbl[3][50]; int main() { long long l, r, a, b; int i, n; l = in(), r = in(), n = (int)in(); a = 0; if (l > 1) { a = --l / n; memset(e, 1, (int)(l%n)); } b = r/n - a; memset(f, 1, (int)(r%n)); out(tbl[0], b-1), out(tbl[1], b), out(tbl[2], b+1); n--, outs(tbl[1+f[n]-e[n]]); for (i = 0; i < n; i++) outs(tbl[1+f[i]-e[i]]); return 0; }