HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50684 - Sum of prime numbers from a to b

Guest
• Review clarifications (1)

Section problems

• 50634 - Perfect numbers
• 50635 - Decomposition into terms
• 50637 - Number systems
• 50650 - Prime numbers
• 50652 - Prime Factorization
• 50653 - Long Divide
• 50661 - nth Power of a Digit
• 50662 - Prime numbers (2)
• 50684 - Sum of prime numbers f...
• 50548 - Albanian Airlines
• 50546 - Average Fuel Price

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