fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n, i, k;
  5. char s[81];
  6. scanf("%d", &n);
  7. i=0;
  8. while(i++<n){
  9. scanf("%d%s", &k, s);
  10. s[k-1] = 0;
  11. printf("%d %s%s\n", i, s, s+k);
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2252KB
stdin
4
4 MISSPELL
1 PROGRAMMING
7 CONTEST
3 BALLOON
stdout
1 MISPELL
2 ROGRAMMING
3 CONTES
4 BALOON