Nu aveti permisiuni pentru a descarca fisierul grader_test34.ok
Cod sursa(job #1555597)
| Utilizator | Data | 23 decembrie 2015 11:19:54 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
const int LIM=1000005;
int n, nrl, nrc;
char s[LIM];
int main()
{
cin.get(s, LIM);
n=strlen(s);
for(int i=0; i<=n; ++i)
if(('a'<=s[i] and s[i]<='z') or ('A'<=s[i] and s[i]<='Z'))
nrl++;
else
if(('a'<=s[i-1] and s[i-1]<='z') or ('A'<=s[i-1] and s[i-1]<='Z'))
nrc++;
cout<<nrl/nrc;
return 0;
}
