import java.util.*;


public class Solution {
    /**
     * 
     * @param numbers int整型一维数组 
     * @param target int整型 
     * @return int整型一维数组
     */
    public int[] twoSum (int[] numbers, int target) {
        int[] ans = new int[2];
        Map<Integer,Integer> map = new HashMap<>();
        for(int i = 0;i < numbers.length; i++){
            if(map.getOrDefault(target - numbers[i],0) != 0){
                ans[0] = map.get(target - numbers[i]);
                ans[1] = i + 1;
                break;
            }
            map.put(numbers[i],i + 1);
        }
        return ans;
    }
}