Cod sursa(job #1131090)
| Utilizator | Data | 28 februarie 2014 17:44:27 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <cstdio>
using namespace std;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
int ok=0;
unsigned long long total=0,cuvinte=0;
char x,y;
while(x!='\n')
{
scanf("%c",&x);
if(x=='\n') break;
else
{
if((x>='A'&&x<='Z')||(x>='a'&&x<='z'))
{
total++;
ok=1;
}
else if(ok==1) {cuvinte++;ok=0;}
}
}
printf("%llu",total/cuvinte);
}
