satya5

Untitled

Aug 2nd, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #define get getchar_unlocked
  3.  
  4. inline void scand(int* i)
  5. {
  6. int n=0,p=get();
  7. while( p >= '0' && p <= '9') {
  8. n = (n<<3) + (n<<1) + p-'0' ,p=get();
  9. }
  10. if(p == '\n' || p == EOF)
  11. *i = n;
  12. return ;
  13. }
  14. int main()
  15. {
  16. int i;
  17. scand(&i);
  18. printf("%d\n",i);
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment