a=int(input())
nr=int(input());c=0
p=list(map(int,input().split()))
for i in range(a):
for j in range(i+1,a):
if (p[i]+p[j])%nr==0:c+=1
print(c)
a=int(input())
nr=int(input());c=0
p=list(map(int,input().split()))
for i in range(a):
for j in range(i+1,a):
if (p[i]+p[j])%nr==0:c+=1
print(c)
Hi friends....
In this blog I'm going to give answer for daily test skillrack program, daily challenges and kick start programs and give some coding techniques.
It'll be helpful for u sure and make it usefull
Learn More →
0 Comments