Cod sursa(job #169017)

Utilizator ovy2906Popescu Ovidiu ovy2906 Data 31 martie 2008 23:07:07
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#include<stdio.h>
#include<string.h>
int main(){
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	char s[900000000];
	int nrc=0,nrs=0,nrg=0,i;
	gets(s);
	nrc=strlen(s);
	for(i=0;i<nrc;i++){
		if(s[i]==' '){
			nrs++;
		}
		if(s[i]<65)
			nrg++;
		if(s[i]>122)
			nrg++;
		if(s[i]>=91 && s[i]<=96)
			nrg++;
	}
	if(s[nrc]==' ')
		nrs--;
	printf("%d\n",(nrc-nrs-nrg)/nrs);
	return 0;
}