Pagini recente » Cod sursa (job #886601) | Cod sursa (job #980444) | Cod sursa (job #1347166) | Cod sursa (job #1971110) | Cod sursa (job #254122)
Cod sursa(job #254122)
#include<stdio.h>
#include<string.h>
int what(char c)
{
if(c>='a'&&c<='z'||c>='A'&&c<='Z')
return 1;
return 0;
}
int main()
{
char board[131000];
long long overall=0,words=0,enter=0,i,n;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
for(i=0;i<n;++i)
{
enter=0;
scanf("%c",board+i);
while(what(board[i])&&i!=n)
{
if(entr)
scanf("%c",board+i);
if(!enter)
{
++words;
enter=1;
}
++overall;
++i;
}
}
// printf("%lld %lld\n",overall,words);
overall/=words;
printf("%lld",overall);
}