#include<stdio.h>#include<string.h> 
int main(){char str[101];int count=0,flag=0,i;
    gets(str);for(i=0;i<strlen(str);i++){if(str[i]!='.'&&str[i]!=' '){
            count++;
        } if(count!=0){if(str[i]==' '||str[i]=='.'){               if(!flag){
                  printf("%d",count);
                  flag++;
                }else{
                  printf(" %d",count);
               }
            count=0;
           }
        }
    }return 0;
}

PTA 单词长度(15分)_PTA