1a = int(input("Enter first number:"))
2b = int(input("Enter second number:"))
3sum = a+b
4print(sum)
1class Solution:
2 def twoSum(self, nums: list[int], target: int) -> list[int]:
3 required = {}
4 for i in range(len(nums)):
5 if target - nums[i] in required:
6 return [required[target - nums[i]], i]
7 else:
8 required[nums[i]] = i
9