题解 | #整数与IP地址间的转换#
整数与IP地址间的转换
https://www.nowcoder.com/practice/66ca0e28f90c42a196afd78cc9c496ea
k = [bin(int(i))[2:].rjust(8,'0') for i in input().split('.')] print(int(''.join(k),base=2)) n =bin(int(input()))[2:].rjust(32,'0') print('.'.join([str(int(n[i:i+8],base=2)) for i in range(0,32,8)]))