HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50684 - Sum of prime numbers from a to b

Guest
• Review clarifications (1)

Section problems

• 50568 - Body Mass Index Calculator
• 50579 - Pentagonal Numbers
• 50584 - Total invoice amount
• 50634 - Perfect numbers
• 50635 - Decomposition into terms
• 50652 - Prime Factorization
• 50653 - Long Divide
• 50662 - Prime numbers (2)
• 50684 - Sum of prime numbers f...
• 50546 - Average Fuel Price
• 50247 - Missing numbers
• 50301 - Fractions to Decimals
• 50332 - Variance of a series
• 50342 - 100 Factorial
• 50338 - Convert Into Decimal
• 50343 - The number of Ending Zero...
• 50557 - nth Power of m (Long Multiply)

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