Count The Keyword

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 3447
64-bit integer IO format: %I64d      Java class name: Main

Description

John loves various languages. Recently he begins to learn C programming language. He is interested in the keyword of C and knows the importance of keywords. So each time he gets a C program source code, he counts the the appearance of the valid keyword first. However, when the code is long, John can't count it correctly. Now he needs your help, he will give you some C code, and he wants you tell him the correct number of the appearance of the keyword.
In order to make the problem easier. John provides you some information.
1, the code don't contain "#define", i.e. the code don't contain the Macro definition .
2, the code may contain type cast, i.e. int a = (int)b;
3, the keywords in the comments are not valid.
4, the keywords in a string are not valid, and the character in the string will be expressed by letter. i.e. The string like "ab\x40" will not appear.
5, it guarantees that a word or a statement is in the same line, but one line may contain many words or statements.
6, one line contain no more than 300 characters and one word is less than 50 characters.

Input

The input file contains no more than 10 cases.
Each case contains a completely or incompletely correct C program and cases are separated by a line contains only four '#', i.e. "####".

Output

Each case outputs a number which is the sum of the Keyword appears.

Sample Input

#include <stdio.h>
main(){
int a;
int b;
scanf("%d%d",&a,&b);
printf("%d\n",a+b);
}

Sample Output

2

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .