#K10046. Two Sum Indices

    ID: 23159 Type: Default 1000ms 256MiB

Two Sum Indices

Two Sum Indices

You are given an array of integers and a target integer. Your task is to find two distinct indices (i) and (j) such that $$nums_i + nums_j = target$$. It is guaranteed that each input has exactly one solution and you may not use the same element twice. The input is provided from standard input and the result must be printed to standard output.

inputFormat

The input consists of two lines:\n1. The first line contains space-separated integers representing the array.\n2. The second line contains a single integer representing the target sum.

outputFormat

Output the two indices separated by a space. The order of indices should reflect the order in which they appear in the array.## sample

2 7 11 15
9
0 1