2192 - I2P(II)2020_Chen_bonus2 Scoreboard

Time

2020/12/10 20:24:00 2020/12/17 18:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
13033 Fix the Bug

13033 - Fix the Bug   

Description

"Money doesn't matter." ~by rich people

"Looks doesn't matter." ~by Attractive people

"Bugs doesn't matter." ~by programmer

 

You are programmer, you have no life and you need to figure out some problem without creating bugs.


 

Given n numbers , and integer k.

You can concatenate two number , into either or .

You need to figure out how many ways are there to concatenate two number such that the concatenation of two numbers is divisible by k.

Example

n = 6, k = 11

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

you can concatenate into , is divisible by 11.

There are 7 ways to concatenate two number which is divisible by 11.

Hence the answer is 7.

 


 

 

Input

The input end with EOF, there will be at most 3 testcases.

For each testcase,

the first line contains two integer n () , k

the second line contains n integer ()

 

Output

 

For each input, print the number of ways to concatenate two number such that

the concatenation of two numbers is divisible by k.

Remember to print \n at the end of each output.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss