首页 > TAG信息列表 > HJ33

牛客华为机试HJ33

原题传送门 1. 问题描述 2. Solution 1、思路 bit对齐 2、实现 import sys if sys.platform != "linux": file_in = open("input/HJ33.txt") sys.stdin = file_in def int2bin(n, bits=8): n_b = bin(n).replace("0b", "") return

HJ33 整数与IP地址间的转换

HJ33 整数与IP地址间的转换 位运算 题目 代码 #include <iostream> using namespace std; //位运算 int main(){ long long int a, b, c, d, num; while(scanf("%lld.%lld.%lld.%lld",&a, &b, &c, &d) != EOF){ cin>>num; cout<< (a<<