Cod sursa(job #919585)
| Utilizator | Data | 19 martie 2013 19:00:53 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream in ("text.in");
ofstream out ("text.out");
char s[]="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",c;
int main()
{
int l=0,now=0,w=0,i=0;
while(in.get(c))
{
i++;
char *p;
p=strchr(s,c);
if(p)
{
if(now==0)
{
now=1;
w++;
}
l++;
}
else
now=0;
}
out<<l/w;
return 0;
}
