Cod sursa(job #52123)
Utilizator | Data | 17 aprilie 2007 21:29:55 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <stdio.h>
long long l,nr;
char c,re;
int main()
{
freopen("text.in","rt",stdin);
freopen("text.out","wt",stdout);
while (!feof(stdin))
{
re=c;
c=getchar();
if ((c<='Z'&&c>='A')||(c<='z'&&c>='a')) l++;
if ( (!((c<='Z'&&c>='A')||(c<='z'&&c>='a')))&&(((re<='Z'&&re>='A')||(re<='z'&&re>='a')))) nr++;
}
printf("%lld",l/nr);
fclose(stdin);
fclose(stdout);
return 0;
}