Cod sursa(job #2206594)
Utilizator | Data | 23 mai 2018 01:44:11 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <cstring>
#include <cstdio>
#include <cstdint>
int main() {
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
uint32_t len = 0;
uint32_t words = 0;
char word[1024 * 1024 + 1];
while(scanf("%s", word) != EOF) {
len += strlen(word);
words++;
}
printf("%u", len / words);
return 0;
}