Processing math: 100%
祝同学们学习进步,编程快乐!
Problem 2639 --Bitset I - Bit Operation I

2639: Bitset I - Bit Operation I

"
Time Limit 1 秒/Second(s) Memory Limit 512 兆字节/Megabyte(s)
提交总数 181 正确数量 107
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Given a non-negative decimal integer xx, convert it to binary representation bb of 32 bits. Then, print the result of the following operations to bb respecitvely.

  • Inversion: change the state of each bit to the opposite state
  • Logical left shift: shift left by 1
  • Logical right shift: shift right by 1

Input

The input is given in the following format.

xx 



Output

Print the given bits, results of inversion, left shift and right shift in a line respectively.

8
13
00000000000000000000000000001000
11111111111111111111111111110111
00000000000000000000000000010000
00000000000000000000000000000100

00000000000000000000000000001101
11111111111111111111111111110010
00000000000000000000000000011010
00000000000000000000000000000110

Constraints

  • 0x23210≤x≤232−1

Sample Input 1

推荐代码 查看2639 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[0 ms] 朱雨曦 1061028 2024-01-12 19:18:25
内存最少[1228 KB] 舒航 1162152 2025-01-07 19:34:51
第一AC AOJ大管家 338454 2018-12-05 20:20:49
第一挑战 却又像风捉摸不住 337349 2018-12-03 21:49:24

赛题来源/所属竞赛 会津大学《C++ Programming II》 C++程序设计(高级)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1849 2024-2025-1学期《程序设计技能实训》博弈论、二进制和位运算【24计算机】 2024-12-15 08:00:00 请登录
1790 2023-2024-1学期《程序设计技能实训》博弈论、二进制和位运算【23计算机】 2023-12-18 00:00:00 请登录
1675 2021-2022-1学期《程序设计技能实训》二进制和位运算【21计算机1234】 2021-12-14 07:00:00 请登录
1602 2020-2021-1学期《程序设计技能实训》二进制和位运算【20计算机12345】 2020-12-25 18:00:00 请登录
AOJ
祝同学们学习进步,编程快乐!