HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


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

Guest
• Review clarifications (1)

Volume problems

• 50559 - Prime Factors of a Number
• 040. 50354 - Intersecting Rectangles
• 060. 50727 - Fibonacci Numbers
• 061. 50733 - The Highest Average
• 076. 50289 - Monthly Allowance
• 080. 50347 - Selling Oranges
• 090. 50378 - Sum of the given digits
• 110. 50409 - Random Password Ge...
• 120. 50684 - Sum of prime num...
• 130. 50652 - Prime Factorization
• 140. 50393 - Palindromic Numbers
• 148. 50412 - K numbers
• 150. 50375 - Area of Circles
• 160. 50388 - Number of Armstrong ...

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