Leeee1111 / testjudge-asia

0 stars 0 forks source link

B0508 兩數之和 #47

Open Leeee1111 opened 1 week ago

Leeee1111 commented 1 week ago
target,n=map(int,input().split())
a=list(map(int,input().split()))
for i in range(len(a)-1):
    for j in range(i,len(a)):
        if a[i]+a[j]==target:
            print(i,j,sep=" ")