Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<iostream>
- using namespace std;
- int main(){
- char s[999999];
- gets(s);
- long long count=0;
- if(s[0]!= ' ')
- count=1;
- for(int i=0;i<strlen(s)-1;i++){
- if(s[i]==' '&&s[i+1]!= ' ')
- count++;
- }
- cout<<count;
- long long cow=0;
- if(s[0]!= ' ')
- cow=1;
- for(int i=0;i<strlen(s)-1;i++){
- if(s[i]==46)
- cow++;
- }
- cout<<' '<<cow;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement