19 lines
242 B
C
19 lines
242 B
C
#include <stdio.h>
|
|
|
|
int main(){
|
|
char s[1000001];
|
|
scanf("%[^\n]",s);
|
|
|
|
int n=0;
|
|
|
|
if(s[0]!=' ') n=1;
|
|
|
|
for(int i=0; s[i+1]!='\0'; i++){
|
|
if((s[i]==' ') && (s[i+1]!=' ')) n++;
|
|
}
|
|
|
|
printf("%d",n);
|
|
|
|
return 0;
|
|
|
|
} |