Cod sursa(job #701332)
Utilizator | Data | 1 martie 2012 15:16:40 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <cstdio>
#include <cstring>
using namespace std;
#define maxn 4010000
int n, i, j, k, cs, lg, nr;
char s;
int main()
{
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
while(scanf("%c", &s)==1)
{
if((s>='a' && s<='z') || (s>='A' && s<='Z'))
{
++lg;
cs=1;
}
else
{
nr+=cs;
cs=0;
}
}
printf("%d\n", lg/nr);
return 0;
}