-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathp3.cpp
40 lines (36 loc) · 876 Bytes
/
p3.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/************************************************************************/
/* Name: Towfiqul Islam */
/* uva id: 448714 */
/* email id: towfiq.106@gmail.com */
/* institute: IIUC */
/* address: Chittagong, Bangladesh */
/* */
/************************************************************************/
#include<iostream>
#include<cstdio>
#include<string.h>
#include<stdlib.h>
using namespace std;
int main ()
{
int t,c;
long l;
char *p, *e,s[100000];
scanf("%d",&t);
while(t--)
{
scanf(" %[^\n]", s);
c=0;
for(p=s; ; p=e)
{
l=strtol(p, &e, 0);
if(p==e)
{
break;
}
c++;
}
printf("%d\n",c);
}
return 0;
}