LearnPy Hub
← Arena
IntermediateRating 1100

Two Numbers That Add Up

Find positions i < j (from 1) with aᵢ + aⱼ = target. Exactly one pair exists. Print i and j.

Input

n and target, then n integers.

Output

Two integers.

Sample 1

Input
4 9
2 7 11 15
Output
1 2

Sample 2

Input
3 6
3 2 4
Output
2 3
solution.py
Output appears here
Two Numbers That Add Up · Python Arena problem · LearnPy Hub