Skip to content

Create Prime Triplets #54

Open
Open
@akshitagupta15june

Description

@akshitagupta15june

Given an array A of n integers , find number of triplets (i,j,k) where i<j<k such that there is atleast one prime digit which is common to each number.
Input Format

The first line contains N integers followed by the number of elements
Constraints

N<=10^5
Ai<=10^18.
Output Format

Output the number of triplets
Sample Input

5
21
22
23
24
25

Sample Output

10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions