统计单词个数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
输入一行字符串,包含若干个单词,约定相邻的两个单词用空格隔开,编程统计单词的个数
输入格式
一行空格隔开的若干个单词。
输出格式
单词个数
Hello World
2
提示
单词前后可能有多个空格