Problem Description
Loading...
Problem Analysis
The principle is that the ASCII code of Chinese characters is negative.
Note that the input may contain spaces.
Also, a Chinese character occupies two characters.
So if you count by incrementing by 1 in a loop,
you need to halve the result.
cpp
| |
Problem link: [HDU] [2030] Chinese Character Counting