n=int(input())
a=[(((ord(max(i))-ord('0'))*11+(ord(min(i))-ord('0'))*7)%100)//10 for i in input().split()]
l=[0]*10
for i in range(n-2):
for j in a[i+2::2]:
l[j]+=(j==a[i])
n=0
for i in l:
n+=(i>0)+(i>1)
print(n)
n=int(input())
a=[(((ord(max(i))-ord('0'))*11+(ord(min(i))-ord('0'))*7)%100)//10 for i in input().split()]
l=[0]*10
for i in range(n-2):
for j in a[i+2::2]:
l[j]+=(j==a[i])
n=0
for i in l:
n+=(i>0)+(i>1)
print(n)
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