题解 | #整数与IP地址间的转换#
整数与IP地址间的转换
https://www.nowcoder.com/practice/66ca0e28f90c42a196afd78cc9c496ea
#7行代码搞定 while True: try: print(int(''.join(map(lambda x:bin(int(x))[2:].zfill(8),input().split('.'))),2)) in_intip=input() print('.'.join([str(int(bin(int(in_intip))[2:].zfill(32)[i:i+8],2)) for i in range(0,32,8)])) except: break