Cod sursa(job #2699200)
| Utilizator | Data | 23 ianuarie 2021 20:45:08 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <fstring>
#include <iostream>
#include <cstring>
using namespace std;
ifstream fin("test.in");
ofstream fout("test.out");
int main()
{
char s[100001];
char* p;
int cnt = 0, x = 0;
cin.getline(s, sizeof(s));
p = strtok(s, " !@#$%^&*()_+}{|:?><,./\';][=-");
while (p != NULL)
{
x += strlen(p), cnt++;
p = strtok(NULL, " !@#$%^&*()_+}{|:?><,./\';][=-");
}
cout << (x - 1) / cnt;
}
