题解 | #整数与IP地址间的转换#
整数与IP地址间的转换
https://www.nowcoder.com/practice/66ca0e28f90c42a196afd78cc9c496ea
l=input().split(".") s="" for i in l: i=bin(int(i))[2:].zfill(8) s=s+str(i) n=int(s,2) n1=input() s1=str(bin(int(n1))[2:].zfill(32))+"s" l1=[] for i in range(4): l1.append(str(int(s1[8*i:8*(i+1)],2))) print(n) print(l1[0]+"."+l1[1]+"."+l1[2]+"."+l1[3])