Pagini recente » Istoria paginii utilizator/lavismile | Cod sursa (job #950764) | Istoria paginii runda/mere | Diferente pentru blog/viata-dupa-olimpiade-1 intre reviziile 15 si 14 | Cod sursa (job #252189)
Cod sursa(job #252189)
#include<stdio.h>
#include<iostream>
#define N 10000000
using namespace std;
long long solve()
{
freopen("text.in","r",stdin);
int litere=0,cuvinte=0;
char ch,cch;
while(scanf("%c",&ch)!=EOF)
{
if((ch<'A' || ch>'Z' && ch<'a' || ch>'z') && (cch>='A' && ch<='Z' || ch>='a' && ch<='z'))
++cuvinte;
if(ch>='a'&& ch<='z' || ch>='A' && ch<='Z')
++litere;
cch=ch;
}
return litere/cuvinte;
}
void afisare()
{
freopen("text.out","w",stdout);
printf("%lld",solve());
}
int main()
{
solve();
afisare();
return 0;
}