Description

Suppose that you want to count the number of cases where a prime number is generated when adding 3 numbers among the given numbers. Given an array nums containing numbers as the parameter, write a function solution to return the number of cases where a prime number is generated when adding 3 different numbers among nums.

Constraints
  • Length of nums is between 3 and 50.
  • Each element of nums is a natural number between 1 and 1,000, and there are no duplicate numbers.

Examples
nums result
[1,2,3,4] 1
[1,2,7,6,4] 4

Example #1
7 can be generated when using [1,2,4].

Example #2
7 can be generated when using [1,2,4].
11 can be generated when using [1,4,6].
13 can be generated when using [2,4,7].
17 can be generated when using [4,6,7].

Result Stop
Result of [Run] or [Submit] will be displayed here