Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int T, i, count = 0;
- long input;
- char s[100000];
- char *q, *e;
- scanf("%d",&T);
- for (i=1;i<=T;i++) {
- gets(s);
- for(q = s; ;q = e) {
- input = strtol(q, &e, 10);
- if (q == e) {
- break;
- }
- count++;
- }
- printf("%d\n",count);
- count = 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement