Cod sursa(job #329357)
| Utilizator | Data | 5 iulie 2009 22:27:32 | |
|---|---|---|---|
| Problema | Text | Scor | 90 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
#include<cstdio>
long long l,c;
void citire()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char s[2];
scanf("%c",&s[1]);
if ((s[1]>='a'&&s[1]<='z')||(s[1]>='A'&&s[1]<='Z'))
++l;
while (scanf("%c",&s[0])!=EOF)
{
if ((s[0]>='a'&&s[0]<='z')||(s[0]>='A'&&s[0]<='Z'))
++l;
else
if ((s[1]>='a'&&s[1]<='z')||(s[1]>='A'&&s[1]<='Z'))
++c;
s[1]=s[0];
}
printf("%lld",l/c);
}
int main()
{
citire();
return 0;
}
