Pagini recente » Cod sursa (job #1383784) | Cod sursa (job #1010273) | Cod sursa (job #1502767) | Cod sursa (job #468879) | Cod sursa (job #1131104)
#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;
while(scanf("%c",&x)!=EOF)
{
if((x>='A'&&x<='Z')||(x>='a'&&x<='z'))
{
total++;
if(ok==0) cuvinte++;
ok=1;
}
else ok=0;
}
if(total==0||cuvinte==0) printf("0");
else printf("%llu",total/cuvinte);
}