首页 > 其他分享 >oddd

oddd

时间:2022-12-07 22:23:32浏览次数:33  
标签:tmp map int len range oddd

https://blog.csdn.net/cxh21627/article/details/125206659

 

一、配出最小绝对值

while True:
    try:
        l = list(map(int,input().split()))
        m = 65535*2
        L = []
        for i in range(len(l)):
            for j in range(i+1,len(l)):
                tmp = abs(l[i]+l[j])
                if tmp < m:
                    m = tmp
                    L.clear()
                    o = [l[i],l[j],tmp]
                    L.extend(o)
        print(" ".join(map(str,L)))
    except:
        break

 

标签:tmp,map,int,len,range,oddd
From: https://www.cnblogs.com/hooo-1102/p/16964725.html

相关文章