Summer is coming!
When you travel, you always plan ahead. You have shortlistedcities to travel. Each city has distinct integer id from to . Each city also has a satisfaction score associated with it. If you travel to a city you will get the satisfaction score. Your “Happiness Score” is the sum of all the satisfaction scores from all the cities you’ve travelled to.
You have a passion for numbers – especially prime numbers. You want to know how many possible unique prime numbers you can get as “Happiness Score” by visiting any subset (possibly some or all) of thecities.
First line will be an integer denoting number of cities. Second line will have satisfaction scorefor all the cities from 1 to .
- A prime number is a natural number greater than 1 which has no positive divisors other than 1 and itself.
Output should be an integer number denoting how many possible
Happiness Scores you can get which are prime numbers.
3 3 2 6
You can achieve “Happiness Scores” 3, 2, (3+2), (3+2+6) , where all of them are prime numbers. Here 2, 3 , 5, 11 are prime numbers.