Cod sursa(job #1033263)
| Utilizator | Data | 16 noiembrie 2013 17:27:45 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <cstdio>
#include <cstring>
using namespace std;
char in[2000005];
bool let(int x){
if(in[x] <= 'Z' && in[x] >= 'A')
return true;
if(in[x] >='a' && in[x] <= 'z')
return true;
return false;
}
int main(){
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
int nw = 0, nch = 0;
gets(in);
int lim = strlen(in);
for(int i = 0; i < lim; ++i){
if(let(i)){
++nw;
while(let(i)){
++nch;
++i;
}
}
}
printf("%d", nch / nw);
return 0;
}
