TCS Company Numerical Ability Algebra

find the last digit of the following expression:4+9^2+4^3+9^4+4^5+9^6+....+9^100

Read Solution (Total 9)

TCS Other Question

Some prime numbers can be expressed as Sum of other consecutive prime numbers.
For example

5 = 2 + 3
17 = 2 + 3 + 5 + 7
41 = 2 + 3 + 5 + 7 + 11 + 13

Your task is to find out how many prime numbers which satisfy this property are present in the range 3 to N subject to a constraint that summation should always start with number 2.

Write code to find out number of prime numbers that satisfy the above mentioned property in a given range.

Input Format:

First line contains a number N


Output Format:

Print the total number of all such prime numbers which are less than or equal to N.


Constraints:
1. 2
Asha is older than Swati
Mohtarma is older than Asha but younger than Kashish.
Kashish is older than Swati.
Swati is younger than Mohtarma.
Gauri is the oldest.
Who is youngest?
(a) Kashish (b) Asha (c) Mohtarma (d) Swati