day1
방법1
# 방법1
def two_sum(nums, target):
for i in range(len(nums)):
for j in range(len(nums)):
if i == j :
continue
else:
if nums[i] + nums[j] == target:
return [i, j]
a = two_sum(num, 18)
print(a)
방법2
# 방법2
def two_sum(nums, target):
# 아래 코드를 작성해주세요.
for i in range(len(nums)-1):
for j in range(i+1, len(nums)):
if nums[i] + nums[j] == target:
return [i, j]
nums = [4,9,11,14]
target = 13