Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests [2]
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
统计单词
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 81, Accepted users: 62
Problem 11292 : No special judgement
Problem description
  编写一个函数,该函数能够统计一个英文字符串中有多少个单词。

Input
  第一行是整数n,表示测试的数据组数,下面是n行含空格的字符串(仅由空格和英文字符组成,可能为空串)。

Output
  每行输入对应一行输出,表示对应行有多少单词。

Sample Input
1
I am a student
Sample Output
4
Problem Source
  UESTC

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:7331 today,12401406 total, since 2010-05-07