Run ID:106187
提交时间:2025-01-15 16:36:03
def ten_to_two(k): t1=0 t2=0 for i in k: res="" while i!=0: res+=str(i%2) i//=2 if res.count("1")>res.count("0"): t1+=1 else: t2+=1 return t1,t2 x=[] for i in range(1,1001): x.append(i) a=ten_to_two(x) print(a[0],a[1])