Cod sursa(job #3315254)

Utilizator tudor13mai@gmail.comBuciuman Tudor [email protected] Data 13 octombrie 2025 11:38:30
Problema Text Scor 40
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.38 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main(){
    char c[1000100];
    int n=0;
    fin.getline(c,1000100);
    char t[]=" !@#$%^&*{}[]:;<>,./?~";
    char *f=strtok(c,t);
    int y=0;
    while(f){
        y++;
        n+=strlen(f);
        f=strtok(NULL,t);
    }
    fout<<int(n/y);
    return 0;
}