fork(3) download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main(void) {
  4. char tekst[1000000];
  5. fgets(tekst,1000000,stdin);
  6. int d=strlen(tekst);
  7. int z;
  8. for(z=0;z<d;z+=2){
  9. const const char a=tekst[z];
  10. printf("%c",a);}
  11. if(d%2==0){
  12. for(z=d-3;z>0;z-=2){
  13. const const char a=tekst[z];
  14. printf("%c",a);}}
  15. else if(d%2==1){
  16. for(z=d-2;z>0;z-=2){
  17. const const char a=tekst[z];
  18. printf("%c",a);}}
  19. return 0;}
Success #stdin #stdout 0s 3016KB
stdin
AagknsiweesiznkaoK
stdout
Agnieszkoaniewska