Medium
Words in a File
Read n lines and write them to
text.txt. Then read the file and print the number of words and characters (excluding newlines).Input
n, then n lines.
Output
words characters
Sample 1
Input
2 hello world hi
Output
3 13
Sample 2
Input
1 a
Output
1 1
Output appears here