Is it divisible?
Practice
0 (0 votes)
Easy
Simple Math
Problem
58% Success 721 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Question is pretty straight-forward.

You are given a set of 'n' numbers. You need to find total pairs of numbers whose sum is divisible by 5.

Note: Pair of numbers means collection of any two numbers from the set.

See sample test-case for more understanding.


Input format:

First line consist of total numbers given as 'n'.

Next Line consists of 'n' numbers seperated by space.


Output format:

Output total pairs whose sum is divisible by 5.


Constraints:

1 <= n <= 10^6

1 <= number <= 10^6

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
Tags:
Modular arithmeticNumber TheoryHiringEasyMathematicsMathamatics
Points:20
3 votes
Tags:
Easy
Points:20
2 votes
Tags:
inverse-moduloEasymath