hackerrank ice cream parlor

Solutions on MaxInterview for hackerrank ice cream parlor by the best coders in the world

showing results for - "hackerrank ice cream parlor"
Mathilda
02 Jan 2019
1# you require like no knowledge of topics like 
2# enumerate, binary search, sorted
3
4n = int(input())
5
6for _ in range(n):
7    m = int(input())
8    arrn = int(input())
9    arr = list(map(int, input().split()))
10    for i in range(len(arr)):
11        for j in range(i, len(arr)):
12            if arr[i] + arr[j] == m:
13                if i != j:
14                    print(i+1, j+1)
15                    break
16# after going through various concepts
17# i coded out this simple soulution which was the easiest thing
18# and realized that it was quite easy than i thought
19