Primes Problem

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

Description

Given a number n, please count how many tuple(p1, p2, p3) satisfied that p1<=p2<=p3, p1,p2,p3 are primes and p1 + p2 + p3 = n.

Input

Multiple test cases(less than 100), for each test case, the only line indicates the positive integer $n (n \leq 10000)$.

Output

For each test case, print the number of ways.

Sample Input

3
9

Sample Output

0
2

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .