fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main (){
  4. const int N=253;
  5. const int M=253;
  6. char str[N], res[M], c;
  7. int i=0,m;
  8. scanf("%d", &m);
  9. c = getchar();
  10. while ((i < N - 1) && (c = getchar()) != '\n')
  11. str[i++]=c;
  12. str[i--]='\0';
  13. printf("%d\n", m);
  14. m=0;
  15. while (m<=i)
  16. printf("%c", str[m++]);
  17. return 0;
  18. }
Success #stdin #stdout 0s 10320KB
stdin
5
dwedw eg erg e rg erg
stdout
5
dwedw eg erg e rg erg