Cod sursa(job #2393955)
Utilizator | Alghisi Alessandro Paolo alexalghisi | Data | 1 aprilie 2019 11:14:23 |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <cstdio>
#include <iostream>
#define DN 1024*1025
using namespace std;
char x;
int main()
{
int nrcuv=0,nrlitere=0;
freopen("text.in","r", stdin);
freopen("text.out","w", stdout);
bool ok=false;
while(!feof(stdin))
{
scanf("%c",&x);
ok=false;
while((x>='a' && x<='z') || (x>='A' && x<='Z'))
{
nrlitere++;
ok=true;
scanf("%c",&x);
}
if(ok==true) nrcuv++;
}
printf("%d",nrlitere/nrcuv);
fclose(stdin);
fclose(stdout);
return 0;
}