fork(1) download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. register char c = 0, s = 0;
  5. int n;
  6. n=0;
  7. while(c<33) c=getc_unlocked(stdin);
  8. if(c==45) {s=1; c=getc_unlocked(stdin);}
  9. while(c>32) {n=(n<<3)+(n<<1)+(c-48); c=getc_unlocked(stdin);}
  10. if(s==1) n=-n;
  11.  
  12. printf("%d",n);
  13.  
  14. return(0);
  15. }
Success #stdin #stdout 0.02s 1724KB
stdin
-4234
stdout
-4234