Dollar Dayz Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5655 Accepted: 2125 Description Farmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of tools on sale. During his first visit, the tools are sell
高低位交换 题目链接 这道题非常水,我是用位运算做的 a=n>>16 二进制的“高位”b=n-(a<<16) 二进制的“低位”ans=(b<<16)+a 转换 #include<iostream> #include<cstring> #include<cstdio> using namespace std; #define int long long int n; #undef int int main() #define int l
这个题简单来说就是把一个数转成32位的2进制数,不够的补0.然后把这个数的前半部分和后半部分互换,再计算结果. 思路简单明了,接下来是代码: #include<iostream> #include<cstdio> #include<map> #include<cmath> using namespace std; long long a,b,shu[50],s=1,zshu; int main() { scanf("%lld",&