Pair Count
Practice
3.7 (245 votes)
Mathematics
Sieve
Approved
Easy Medium
Problem
60% Success 5647 Attempts 30 Points 2s Time Limit 256MB Memory 1024 KB Max Code
You are given an array
INPUT
The first line of each test file contains two space separated integers N and D, where N denotes the size of array A and D is as described above. Next line contains N space separated integers
OUTPUT
Output a single line containing the number of pairs as described in problem statement.
CONSTRAINTS
Please login to use the editor
You need to be logged in to access the code editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
4 votes
Tags:
Medium
Points:30
Tags:
MediumAd-HocLinear AlgebraMatrix ExponentiationAlgorithmsMathematicsOpenApproved
Points:20
48 votes
Tags:
ApprovedBasic ProgrammingEasyImplementationOpen
Editorial
Login to unlock the editorial