HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


120. 50684 - Sum of prime numbers from a to b

Guest
• Review clarifications (1)

Volume problems

• 066. 50523 - Total Tax to Pay
• 070. 50534 - Top Trading Company
• 076. 50289 - Monthly Allowance
• 080. 50347 - Selling Oranges
• 090. 50378 - Sum of the given digits
• 095. 50453 - The Cubic Difference
• 100. 50397 - The Number of Points ...
• 110. 50409 - Random Password Ge...
• 120. 50684 - Sum of prime num...
• 125. 50578 - Mersenne prime
• 130. 50652 - Prime Factorization
• 132. 50474 - Sum of Two Primes
• 135. 50572 - Palindromic Numbers
• 140. 50393 - Palindromic Numbers
• 145. 50586 - Prime Palindromes
• 148. 50412 - K numbers
• 150. 50375 - Area of Circles

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Sum of prime numbers from a to b

Shqip

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. E.g. 2, 3, 5, 7, 11, 13, 17, 19, 23, 29...

Write a program that asks for a and b and finds the sum of all prime numbers from a to b assuming 1< a< b≤ 100.000.

Input Specification
There are only two int numbers space separated.

Output Specification
Show the sum of all prime numbers from a to b.

Sample Input I     
2 10   

Sample Output I
17

Sample Input II
10 25

Sample Output II
83

Для отправки решений необходимо выполнить вход.

www.contester.ru