We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#!/bin/python3importsysdeficecreamParlor(n,m,a):# Complete this functiond=dict()foriinrange(n):if(a[i]indandd[a[i]]!=0):print(d[a[i]],i+1)breakif(a[i]<m):d[m-a[i]]=i+1if__name__=="__main__":t=int(input().strip())fora0inrange(t):m=int(input().strip())n=int(input().strip())arr=list(map(int,input().strip().split(' ')))icecreamParlor(n,m,arr)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
order of n