| Problem ID | 1096 |
|---|---|
| Title | Sum of Primes |
| Description | This task is simple. You are given two integers L and R, your task is to add up all primes between L and R, including L and R. |
| Input | The first line contains an integer T, the number of test cases. For each of the following T (1 ≤ T ≤ 10) lines, each line contains 2 integers, L and R (1 ≤ L ≤ R ≤ 20000). |
| Output | The sum of primes between L and R inclusively. |
| Sample Input | 3 11 20 21 30 11 30 |
| Sample Output | 60 52 112 |
| Hint | |
| Last Modified | 2012-10-04 21:56:36 |
| Time Limit | 1 seconds |
| Memory Limit | 64 MB |
| Accepted Solutions | 1 |
| Submitted Solutions | 4 |
| Difficulty Factor | 564 |
Facebook