代码拉取完成,页面将自动刷新
//#include<stdio.h>
//#include<string.h>
//#include<stdlib.h>
//#include<assert.h>
////int add(int x, int y)
////{
//// int z = x + y;
//// return 0;
////}
////int main()
////{
//// int a = 10;
//// int b = 20;
//// int ret = add(a, b);
//// printf("%d\n", b);
//// return 0;
////}
//
//
//
////int main()
////{
////
//// //int a = 10;
//// //int** pa = &a;
//// //*pa = 20;
//// printf("%d", a);
//// return 0;
////}
////
////struct sq
////{
//// int age;
//// char mane[20];
////}plepeo1;
////
////
////struct ps {
//// char sf[20];
//// struct sq s;
////};
////
////void add(struct ps* plepeo)
////{
//// //printf("%s %d %s\n",(*plepeo).sf,(*plepeo).s.age,plepeo->s.mane
//// printf("%s %d %s\n", plepeo->sf, plepeo->s.age, plepeo->s.mane);
////}
////void add0(struct ps plepeo)
////{
//// printf("%s %d %s\n", plepeo.sf, plepeo.s.age, plepeo.s.mane);
////}
////int main()
////{
//// struct ps plepeo = { "fuzhou",{12,"zhengjianyuan"}};
//// //printf("%s %d %s\n",plepeo.sf,plepeo.s.age,plepeo.s.mane);
//// add0(plepeo);
////}
//
//
////long long fun(int n, int k)
////{
//// if (k == 1)
//// return n;
//// return n*fun(n, k - 1);
////}
////
////int main()
////{
//// int n = 0;
//// int k = 0;
//// scanf("%d %d", &n, &k);
//// long long ret=fun(n,k);
//// printf("%lld", ret);
//// return 0;
////}
//
////int DigitSum(int n)
////{
//// if (n/10<1)
//// return n;
//// return n % 10 + DigitSum((int)n / 10);
////}
////
////int main()
////{
//// int n = 0;
//// scanf("%d", &n);
//// int ret=DigitSum(n);
//// printf("%d", ret);
////
//// return 0;
////}
////
////int digstrlen(char* str)
////{
//// if (*str == '\0')
//// return 0;
//// else
//// return 1 + digstrlen(str + 1);
////}
////
////
////int nodigstrlen(char* str)
////{
//// int count = 0;
//// while (*str)
//// {
//// count++;
//// str++;
//// }
//// return count;
////}
////
////int main()
////{
//// int ret1 = digstrlen("abcdef");
//// int ret2 = nodigstrlen("abcdef");
////
//// printf("ret1=%d ret2=%d\n", ret1, ret2);
//// return 0 ;
////}
////
//
////print(int n)
////{
//// if (n / 10 < 1)
//// {
//// printf("%d ",n);
//// return;
//// }
//// print(n / 10);
//// printf("%d ", n % 10);
////}
////int main()
////{
//// print(4159);
//// return 0;
////}
////
////
////void print(int* p,int sz)
////{
//// int i = 0;
//// for (i = 0; i < sz; i++)
//// {
//// printf("%d ", *(p + i));
//// }
//// printf("\n");
////}
////
////int main()
////{
//// int arr[] = { 2,4,5,9,8 };
//// int sz = sizeof(arr) / sizeof(arr[0]);
//// print(arr,sz);
//// return 0;
////}
////
////int main()
////{
//// int i = 0;
//// char star = '*';
//// int tmp = 1;
////
//// for (i = 1; i <=7; i++)
//// {
//// int j = 0;
//// for (j = 7 - i; j > 0; j--)
//// {
//// printf(" ");
//// }
////
//// for (j = 0; j < tmp; j++)
//// {
//// printf("%c",star);
//// }
//// tmp += 2;
//// printf("\n");
//// }
//// tmp -= 4;
//// for (i = 1; i <= 6; i++)
//// {
//// int j = 0;
//// for (j =i; j > 0; j--)
//// {
//// printf(" ");
//// }
////
//// for (j = tmp; j >0; j--)
//// {
//// printf("%c", star);
//// }
//// tmp -= 2;
//// printf("\n");
//// }
////
////
//// return 0;
////}
////
////
//
////#define MAX(x,y) ((x)>(y)?(x):(y))
////int main()
////{
//// int a = 4;
//// int b = 6;
//// int z=MAX(a++, b++);
//// printf("%d\n", z);
////
//// return 0;
////}
//
////#define DEBUG 1
//////开关
////int maina()
////{
////
////#if DEBUG
//// printf("hehehe\n");
////#elif
//// printf("hehehe\n");
////#endif
////#if defined(DEBUG)
//// return 0;
////#endif
////
////}
//
////#define OFFSETOF(type,member) (size_t)&(((type*)0)->member)
////
////struct sq
////{
//// int age;
//// char mane[20];
////};
////int main()
////{
//// printf("%u ", OFFSETOF(struct sq,mane));
////}
//
////#define SWAP(x) (((x&0x55555555)<<1)+((x&0xaaaaaaaa)>>1))
////
////int main()
////{
//// int a = 10;
//// a= SWAP(10);
//// printf("%d", a);
//// return 0;
////}
////
////int main()
////{
//// int a = 0x5;
//// printf("\x74 %d", a);
//// return;
////}
//
////#define OFFSETOF(type,member) (size_t)&(((type*)0)->member)
////
////struct sq
////{
//// int age;
//// char mane[20];
////};
////
////
////int main()
////{
//// printf("%u\n", OFFSETOF(struct sq, mane));
//// return 0;
////}
//
////
////#define SWAP(x) (((x&0x55555555)<<1)+((x&0xaaaaaaaa)>>1))
////
////int main()
////{
//// int a = 10;
//// a = SWAP(a);
//// printf("%d\n",a);
//// return 0;
////}
////int fun1(int n)
////{
//// if (n <=2)
//// {
//// return 1;
//// }
//// else
//// {
//// return fun1(n - 1) + fun1(n - 2);
//// }
////}
////
////int fun2(int n)
////{
//// int i = 0;
//// int prev1 = 1;
//// int prev2 = 1;
//// int now = 1;
//// for (i = 3; i <= n; i++)
//// {
//// now=prev1 + prev2;
//// prev1 = prev2;
//// prev2 = now;
//// }
//// return now;
////}
////
////int main()
////{
//// int n = 0;
//// scanf("%d", &n);
//// printf("fun1=%d\n", fun1(n));
//// printf("fun2=%d\n",fun2(n));
//// return 0;
////}
//
////void reverse_string(char*string)
////{
//// if (*string=='\0')
//// {
//// return;
//// }
//// char*string0 = string;
//// while (*string!='\0')
//// {
//// string++;
//// }
//// string--;
////
//// char tmp = *string0;
//// *string0 = *string;
//// *string = '\0';
//// reverse_string(string0 + 1);
//// *string = tmp;
////}
////
////int main()
////{
//// int i = 0;
//// char arr[] = "abcdef";
//// reverse_string(arr);
//// int sz = sizeof(arr) / sizeof(arr[0]);
//// for (i = 0; i < sz; i++)
//// {
//// printf("%c", arr[i]);
//// }
//// return 0;
////}
//
////long long jiechen1(int n)
////{
//// if (n == 1 || n == 0)
//// return 1;
//// return n * jiechen1(n - 1);
////}
////
////long long jiechen2(int n)
////{
//// if (n == 0)
//// {
//// return 1;
//// }
//// int i = 0;
//// long long sum = 1;
//// for (i = n; i > 0; i--)
//// {
//// sum = sum * i;
//// }
//// return sum;
////}
////
////int main()
////{
//// printf("jiechen1=%lld\n", jiechen1(5));
//// printf("jiechen2=%lld\n", jiechen2(5));
//// return 0;
////}
//
////int main()
////{
//// int arr1[5] = { 1,3,5,7,9 };
//// int arr0[5] = { 2,4,6,8,10};
//// int tmp[5] = { 0 };
//// int i = 0;
//// for (i = 0; i < (sizeof(arr1) / sizeof(arr1[0])); i++)
//// {
//// printf("arr0=%d arr1=%d\n", arr0[i], arr1[i]);
//// }
//// printf("\n");
//// memmove(tmp, arr1, sizeof(arr1));
//// memmove(arr1, arr0, sizeof(arr1));
//// memmove(arr0, tmp, sizeof(arr1));
////
//// for (i = 0; i < (sizeof(arr1) / sizeof(arr1[0])); i++)
//// {
//// printf("arr0=%d arr1=%d\n", arr0[i], arr1[i]);
//// }
//// printf("\n");
//// return 0;
////}
//
////void init(int* arr,int sz)
////{
//// int i = 0;
//// for (i = 0; i < sz; i++)
//// {
//// arr[i] = 0;
//// }
////}
////
////void print(int* arr, int sz)
////{
//// int i = 0;
//// for (i = 0; i < sz; i++)
//// {
//// printf("%d ", arr[i]);
//// }
//// printf("\n");
//// return 0;
////}
////
////void reverse(int* arr,int sz)
////{
//// sz = sz - 1;
//// int* left = arr;
//// int* right = arr + sz;
//// while (left < right)
//// {
//// int tmp = *left;
//// *left = *right;
//// *right = tmp;
//// right--;
//// left++;
//// }
////}
////
////int main()
////{
//// int arr[10] = {1,2,3,4,5,6,7,8,9,0};
//// int sz = sizeof(arr) / sizeof(arr[0]);
//// //init(arr,sz);
//// print(arr, sz);
//// reverse(arr,sz);
//// print(arr, sz);
//// return 0;
////}
////
//
//int i;
//int main()
//{
// i--;
// if (i > sizeof(i))
// {
// printf(">\n");
// }
// else
// {
// printf("<\n");
// }
// return 0;
//}
//int main()
//{
// int arr[10] = { 1,5,6,3,5,8,4,2,5,9 };
// int i = 0;
// int j = 0;
// int sz = sizeof(arr) / sizeof(arr[0]);
// for (i = 0; i < sz - 1; i++)
// {
// for (j = 0; j < sz - 1 - i; j++)
// {
// //小到大
// if (arr[j] > arr[j + 1])
// {
// int tmp = arr[j];
// arr[j] = arr[j + 1];
// arr[j + 1] = tmp;
// }
// }
// }
// for (j = 0; j < sz; j++)
// {
// printf("%d ", arr[j]);
// }
// printf("\n");
// return 0;
//}
#include<stdio.h>
//int main()
//{
// int a = 10;
// int b = 20;
// printf("a=%d b=%d\n", a, b);
// a = a ^ b;
// b = a ^ b;
// //a^b==a^b^b==原始a
// a = a ^ b;
// printf("a=%d b=%d\n", a, b);
//
// //这个时候b为原始 a^b^a=元素b;
//
// return 0;
//}
//int count_binary_1_fre(int num)
//{
// int count = 0;
// int i = 0;
// for (i = 0; i < 32; i++)
// {
// if (((num >> i) & 1) == 1)
// {
// count++;
// }
// }
// return count;
//}
//
//int main()
//{
// int num = 0;
// scanf("%d", &num);
// int number = count_binary_1_fre(num);
// printf("%d\n", number);
// return 0;
//}
int main()
{
int mun = 0;
scanf("%d", &mun);
int odd_number = mun&0x55555555;
int even_number = mun&0xaaaaaaaa;
size_t i = 0;
for (i = 0; i < 32; i++)
{
if (((size_t)(odd_number << i) & ((size_t)2147483648)) == (size_t)2147483648)
{
printf("1");
}
else
{
printf("0");
}
}
printf("\n");
for (i = 0; i < 32; i++)
{
if (((size_t)(even_number << i) & ((size_t)2147483648)) == (size_t)2147483648)
{
printf("1");
}
else
{
printf("0");
}
}
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。