Cod sursa(job #1673196)
Utilizator | Data | 3 aprilie 2016 15:37:04 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <cstdio>
using namespace std;
int l,ok,nc;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c) && c!=10)
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
l++;
ok=0;
}
else
if(l && !ok)
{
nc++;
ok=1;
}
l/=nc;
printf("%d",l);
return 0;
}