NOJ/52/main.c

19 lines
381 B
C
Raw Normal View History

2020-08-31 16:46:43 +00:00
#include <stdio.h>
#include <string.h>
int main(void){
char string[1024];
int n, loc;
scanf("%s",string);
scanf("%d %d",&n,&loc);
int i;
for(i = 0; i < n; i++) putchar(string[i]);
printf("\n");
int len = (int) strlen(string);
for(i = len-n; i <= len-1; i++) putchar(string[i]);
printf("\n");
for(i = loc; i < loc+n; i++) putchar(string[i]);
printf("\n");
return 0;
}