Cod sursa(job #1152830)
| Utilizator | Data | 24 martie 2014 23:33:30 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <fstream>
#include <iostream>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
long long i,k,c;
char s[2000000000];
int main()
{
f.getline (s,2000000000);
for (i=0;s[i]!=0;i++)
{
if ((s[i]>='A'&&s[i]<='Z')||(s[i]>='a'&&s[i]<='z'))
{
k++;
}
else if ((s[i-1]>='A'&&s[i-1]<='Z')||(s[i-1]>='a'&&s[i-1]<='z')) c++;
}
g<<k/c;
return 0;
}
