Cod sursa(job #7726)
Utilizator | Data | 22 ianuarie 2007 09:39:58 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<stdio.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char s[100];
int nr=0,k=0,j,i=0;
while(scanf("%c", &s[++i])!=EOF);
for(j=2; j<i; ++j)
{
if(s[j]==' ' || s[j]=='-' || s[j]==',')
++nr;
else
++k;
}
printf("%d", (k-1)/nr);
return 0;
}