Cod sursa(job #2765612)
| Utilizator | Data | 28 iulie 2021 15:29:42 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.57 kb |
#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main () {
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
long long int n,i,k,c,cuv=1,lit=1;
c=0;
char a;
while(scanf("%c",&a)!=EOF) {
if(isalpha(a)>=1) {
lit++;
if(c==0) {
cuv++;
c=1;
}
} else {
if c != 0 {
cuv++;
}
c=0;
}
}
if c != 0 {
cuv++;
}
printf("%d\n",(lit-1)/(cuv-1));
return 0;
}